[英]Running Jupyter notebook in Docker
You are forwarding port 8080 in the docker run
call with -p 8080:8080
. 您正在使用
-p 8080:8080
在docker run
调用中转发端口-p 8080:8080
。 But you also need to forward port 8888 by adding -p 8888:8888
. 但是您还需要通过添加
-p 8888:8888
转发端口-p 8888:8888
。 More specifically, you want to run: 更具体地说,您要运行:
docker -it -p 8080:8080 -p 8888:8888 jupyter/minimal-notebook
First thing is Jupyter nootbook runs on port 8888. If you want to access the notebook on a diff port on your host you should map it like this -p 80:8888. 首先是Jupyter nootbook在端口8888上运行。如果要在主机上的diff端口上访问笔记本,则应按-p 80:8888的方式映射它。
If you don't mind using the defaults, you should use run the following command. 如果您不介意使用默认值,则应使用运行以下命令。 Run this command:
docker run -p 8888:8888 jupyter/minimal-notebook
. 运行以下命令:
docker run -p 8888:8888 jupyter/minimal-notebook
。 Then 然后
replace the host name in the url given in terminal with localhost like this http://localhost:8888/\\?token\\=<TOKEN>\\&token\\=<TOKEN>
用localhost替换终端在终端提供的URL中的主机名,例如
http://localhost:8888/\\?token\\=<TOKEN>\\&token\\=<TOKEN>
This should work. 这应该工作。
Note: If you map it to a diff port, you should replace it in the url you get in the terminal. 注意:如果将其映射到差异端口,则应将其替换为从终端获得的URL。 Ex.
防爆。
http://localhost:80/\\?token\\=<TOKEN>\\&token\\=<TOKEN>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.