An error was reported when Docker entered the jupyter-notebook container to modify the password.

Docker enters the jupyter/all-spark-notebook container to change the password. Error:

jovyan@67c686087c2d:~$ jupyter notebook password
Enter password: 
Verify password: 
Traceback (most recent call last):
  File "/opt/conda/bin/jupyter-notebook", line 6, in <module>
    sys.exit(notebook.notebookapp.main())
  File "/opt/conda/lib/python3.6/site-packages/jupyter_core/application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/opt/conda/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/opt/conda/lib/python3.6/site-packages/notebook/notebookapp.py", line 1571, in start
    super(NotebookApp, self).start()
  File "/opt/conda/lib/python3.6/site-packages/jupyter_core/application.py", line 255, in start
    self.subapp.start()
  File "/opt/conda/lib/python3.6/site-packages/notebook/notebookapp.py", line 380, in start
    set_password(config_file=self.config_file)
  File "/opt/conda/lib/python3.6/site-packages/notebook/auth/security.py", line 148, in set_password
    config.NotebookApp.password = hashed_password
  File "/opt/conda/lib/python3.6/contextlib.py", line 88, in __exit__
    next(self.gen)
  File "/opt/conda/lib/python3.6/site-packages/notebook/auth/security.py", line 131, in persist_config
    with io.open(config_file, "w", encoding="utf8") as f:
FileNotFoundError: [Errno 2] No such file or directory: "/home/jovyan/.jupyter/jupyter_notebook_config.json"
Mar.01,2021
Menu