Docker启动容器报错PermissionError


Docker指定存储卷和环境变量运行容器时启动失败:
sudo docker run -d -p 9999:8888 -v /opt/docker/jupyter/home/jovyan:/home/jovyan -e "SPARK_OPTS=--driver-java-options=-Xms4096M --driver-java-options=-Xmx10240M --driver-java-options=-Dlog4j.logLevel=info" jupyter/all-spark-notebook

x-json.log:
{"log":"/usr/local/bin/start-notebook.sh: ignoring /usr/local/bin/start-notebook.d/*\n","stream":"stdout","time":"2018-04-09T10:38:28.646441397Z"}
{"log":"\n","stream":"stdout","time":"2018-04-09T10:38:28.646560515Z"}
{"log":"Container must be run with group root to update passwd file\n","stream":"stdout","time":"2018-04-09T10:38:28.668441721Z"}
{"log":"Container must be run with group users to update files\n","stream":"stdout","time":"2018-04-09T10:38:28.668469635Z"}
{"log":"Executing the command: jupyter notebook\n","stream":"stdout","time":"2018-04-09T10:38:28.668476021Z"}
{"log":"Traceback (most recent call last):\n","stream":"stderr","time":"2018-04-09T10:38:29.932363504Z"}
{"log":"  File \"/opt/conda/lib/python3.6/site-packages/traitlets/traitlets.py\", line 528, in get\n","stream":"stderr","time":"2018-04-09T10:38:29.932483755Z"}
{"log":"    value = obj._trait_values[self.name]\n","stream":"stderr","time":"2018-04-09T10:38:29.932491202Z"}
{"log":"KeyError: 'runtime_dir'\n","stream":"stderr","time":"2018-04-09T10:38:29.932496242Z"}
{"log":"\n","stream":"stderr","time":"2018-04-09T10:38:29.932501018Z"}
{"log":"During handling of the above exception, another exception occurred:\n","stream":"stderr","time":"2018-04-09T10:38:29.932505393Z"}
{"log":"\n","stream":"stderr","time":"2018-04-09T10:38:29.932510384Z"}
{"log":"Traceback (most recent call last):\n","stream":"stderr","time":"2018-04-09T10:38:29.932514851Z"}
{"log":"  File \"/opt/conda/bin/jupyter-notebook\", line 6, in \u003cmodule\u003e\n","stream":"stderr","time":"2018-04-09T10:38:29.932519643Z"}
{"log":"    sys.exit(notebook.notebookapp.main())\n","stream":"stderr","time":"2018-04-09T10:38:29.932525289Z"}
{"log":"  File \"/opt/conda/lib/python3.6/site-packages/jupyter_core/application.py\", line 266, in launch_instance\n","stream":"stderr","time":"2018-04-09T10:38:29.932529961Z"}
{"log":"    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)\n","stream":"stderr","time":"2018-04-09T10:38:29.932535048Z"}
{"log":"  File \"/opt/conda/lib/python3.6/site-packages/traitlets/config/application.py\", line 657, in launch_instance\n","stream":"stderr","time":"2018-04-09T10:38:29.932539717Z"}
{"log":"    app.initialize(argv)\n","stream":"stderr","time":"2018-04-09T10:38:29.932544712Z"}
{"log":"  File \"\u003cdecorator-gen-7\u003e\", line 2, in initialize\n","stream":"stderr","time":"2018-04-09T10:38:29.932549069Z"}
{"log":"  File \"/opt/conda/lib/python3.6/site-packages/traitlets/config/application.py\", line 87, in catch_config_error\n","stream":"stderr","time":"2018-04-09T10:38:29.932554039Z"}
{"log":"    return method(app, *args, **kwargs)\n","stream":"stderr","time":"2018-04-09T10:38:29.932558843Z"}
{"log":"  File \"/opt/conda/lib/python3.6/site-packages/notebook/notebookapp.py\", line 1505, in initialize\n","stream":"stderr","time":"2018-04-09T10:38:29.932563403Z"}
{"log":"    self.init_configurables()\n","stream":"stderr","time":"2018-04-09T10:38:29.932568325Z"}
{"log":"  File \"/opt/conda/lib/python3.6/site-packages/notebook/notebookapp.py\", line 1209, in init_configurables\n","stream":"stderr","time":"2018-04-09T10:38:29.932572816Z"}
{"log":"    connection_dir=self.runtime_dir,\n","stream":"stderr","time":"2018-04-09T10:38:29.932577845Z"}
{"log":"  File \"/opt/conda/lib/python3.6/site-packages/traitlets/traitlets.py\", line 556, in __get__\n","stream":"stderr","time":"2018-04-09T10:38:29.932582252Z"}
{"log":"    return self.get(obj, cls)\n","stream":"stderr","time":"2018-04-09T10:38:29.932587774Z"}
{"log":"  File \"/opt/conda/lib/python3.6/site-packages/traitlets/traitlets.py\", line 535, in get\n","stream":"stderr","time":"2018-04-09T10:38:29.932592363Z"}
{"log":"    value = self._validate(obj, dynamic_default())\n","stream":"stderr","time":"2018-04-09T10:38:29.932597113Z"}
{"log":"  File \"/opt/conda/lib/python3.6/site-packages/jupyter_core/application.py\", line 99, in _runtime_dir_default\n","stream":"stderr","time":"2018-04-09T10:38:29.932601825Z"}
{"log":"    ensure_dir_exists(rd, mode=0o700)\n","stream":"stderr","time":"2018-04-09T10:38:29.932606715Z"}
{"log":"  File \"/opt/conda/lib/python3.6/site-packages/jupyter_core/utils/__init__.py\", line 13, in ensure_dir_exists\n","stream":"stderr","time":"2018-04-09T10:38:29.932634318Z"}
{"log":"    os.makedirs(path, mode=mode)\n","stream":"stderr","time":"2018-04-09T10:38:29.932640528Z"}
{"log":"  File \"/opt/conda/lib/python3.6/os.py\", line 210, in makedirs\n","stream":"stderr","time":"2018-04-09T10:38:29.932645185Z"}
{"log":"    makedirs(head, mode, exist_ok)\n","stream":"stderr","time":"2018-04-09T10:38:29.932649865Z"}
{"log":"  File \"/opt/conda/lib/python3.6/os.py\", line 210, in makedirs\n","stream":"stderr","time":"2018-04-09T10:38:29.932654308Z"}
{"log":"    makedirs(head, mode, exist_ok)\n","stream":"stderr","time":"2018-04-09T10:38:29.93265895Z"}
{"log":"  File \"/opt/conda/lib/python3.6/os.py\", line 210, in makedirs\n","stream":"stderr","time":"2018-04-09T10:38:29.932663357Z"}
{"log":"    makedirs(head, mode, exist_ok)\n","stream":"stderr","time":"2018-04-09T10:38:29.932668143Z"}
{"log":"  File \"/opt/conda/lib/python3.6/os.py\", line 220, in makedirs\n","stream":"stderr","time":"2018-04-09T10:38:29.932677887Z"}
{"log":"    mkdir(name, mode)\n","stream":"stderr","time":"2018-04-09T10:38:29.932683301Z"}
{"log":"**PermissionError**: [Errno 13] Permission denied: '/home/jovyan/.local'\n","stream":"stderr","time":"2018-04-09T10:38:29.932688013Z"}
已邀请:

要回复问题请先登录注册