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

Cannot start jupyter notebook when i type the address in the browser

我为 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-主机)中访问 http://58bb309866f3:8888/ 时,我得到:This site can’t be reached.

那么我如何启动 jupyter?我以前从未使用过 jupyter - 我不清楚那是什么 - 但它是访问 cadquery API.

的方式

编辑: 我用 :

启动了 docker 容器
sudo docker run -it --rm -v $WORKDIR:/home/cq -p 8888:8888 bwalter42/jupyter_cadquery:1.0.0

地址58bb309866f3:8888是无法从主机访问的内部容器地址

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

进行连接