在浏览器中输入地址时无法启动jupyter notebook



我下载了cadquery和jupyter notebook的docker镜像。

当我运行容器时,它给了我这样的消息:

[I 19:48:59.700 LabApp] JupyterLab application directory is /opt/conda/envs/cq/share/jupyter/lab
[I 19:48:59.703 LabApp] Serving notebooks from local directory: /home/cq
[I 19:48:59.703 LabApp] Jupyter Notebook 6.1.1 is running at:
[I 19:48:59.703 LabApp] http://58bb309866f3:8888/
[I 19:48:59.703 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

当我在浏览器(docker-host机器)中访问http://58bb309866f3:8888/时,我得到:This site can’t be reached

那么我怎样才能启动木星呢?我以前从未使用过jupyter -我不清楚那是什么-但它是访问cadquery API的方式。

编辑:我启动了docker容器:

sudo docker run -it --rm -v $WORKDIR:/home/cq -p 8888:8888 bwalter42/jupyter_cadquery:1.0.0

地址58bb309866f3:8888是一个内部容器地址,不能从主机访问

您应该使用localhost和docker run命令中映射的端口进行连接。在这种情况下,您可以使用localhost:8888

进行连接

最新更新