【发布时间】:2021-02-04 12:59:30
【问题描述】:
我想将 jupyter notebook 安装到我的 docker 镜像中。在容器中安装并运行后,我无法从浏览器访问它。
这是我的最小设置:
Dockerfile:
FROM python:3.7.5
RUN pip install jupyterlab
EXPOSE 8888
CMD jupyter-lab --allow-root
命令
docker build -t my_image .
docker run -p 8888:8888 my_image
容器输出:
To access the server, open this file in a browser:
file:///root/.local/share/jupyter/runtime/jpserver-7-open.html
Or copy and paste one of these URLs:
http://localhost:8888/lab?token=e6b9a5dd573aabc52e6753e7b21f0daf6270e685055afa50
or http://127.0.0.1:8888/lab?token=e6b9a5dd573aabc52e6753e7b21f0daf6270e685055afa50
我尝试打开这些链接中的任何一个,并在浏览器中收到此消息:
This page isn’t working
localhost didn’t send any data.
ERR_EMPTY_RESPONSE
我做错了什么?
【问题讨论】:
标签: macos docker jupyter-notebook