如何使用docker与jupyter笔记本连接

我试图从马科斯terminal连接到jupyter笔记本电脑,但是当我使用

python run_docker_jupyter.py 

它返回我

 Projects/data_science_course/mlcourse_open:/notebooks -w /notebooks festline/mlcourse_open jupyter Command: jupyter [I 14:12:55.078 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret [W 14:12:55.101 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended. [W 14:12:55.101 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using authentication. This is highly insecure and not recommended. [I 14:12:55.113 NotebookApp] Serving notebooks from local directory: /notebooks [I 14:12:55.114 NotebookApp] 0 active kernels [I 14:12:55.114 NotebookApp] The Jupyter Notebook is running at: http://[all ip addresses on your system]:4545/ [I 14:12:55.114 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 

而且我需要连接本地主机,但一些命令后,它什么都没有返回。 或者,如果我使用docker ps或另一个docker命令,它只在terminal中用符号打印这个命令[在命令之前,然后转到下一个string。 就这样。

这是我第一次使用docker,所以我会很感激的帮助。

尝试使用先testing你的Python,然后尝试运行一些简单的事情:

 python -c "print('test')" 

你应该让你“testing”string作为输出。

然后尝试检查您的docker:问题:

 $docker-machine ssh 

如果一切正常,你将能够运行

 $docker ls 

内核崩溃有一个已知的问题,可以通过使用Tini修复,我已经附加了一些工作得很好的要点链接。

Docker-compose yaml和Dockerfile