PS D:\hexo> docker pull jupyter/datascience-notebook Using default tag: latest latest: Pulling from jupyter/datascience-notebook Digest: sha256:58d84b8c7740ae84eb4ea4d6393ba55a740eef30b2984e43ab27e2218d609f27 Status: Image is up to date for jupyter/datascience-notebook:latest docker.io/jupyter/datascience-notebook:latest
Step3 运行镜像
使用命令docker run -p 8888:8888 -d --restart=always -v C:\jupyter:/home/jovyan/work jupyter/datascience-notebook 运行镜像创建容器
其中参数解释:
1 2 3 4 5 6
docker run [可选参数] jupyter/datascience-notebook # 基础运行指令,[可选参数]位置放置以下各类参数
…… [I 2021-10-02 13:08:28.266 LabApp] JupyterLab application directory is /opt/conda/share/jupyter/lab [I 13:08:28.269 NotebookApp] Serving notebooks from local directory: /home/jovyan [I 13:08:28.269 NotebookApp] Jupyter Notebook 6.4.4 is running at: [I 13:08:28.269 NotebookApp] http://95b548a1acc4:8888/?token=edbb7fb28e561c3e20cdc8dfbfb1469e2ed077db2fc225ea [I 13:08:28.269 NotebookApp] or http://127.0.0.1:8888/?token=edbb7fb28e561c3e20cdc8dfbfb1469e2ed077db2fc225ea [I 13:08:28.270 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 13:08:28.272 NotebookApp]
To access the notebook, open this file in a browser: file:///home/jovyan/.local/share/jupyter/runtime/nbserver-7-open.html Or copy and paste one of these URLs: http://95b548a1acc4:8888/?token=edbb7fb28e561c3e20cdc8dfbfb1469e2ed077db2fc225ea or http://127.0.0.1:8888/?token=edbb7fb28e561c3e20cdc8dfbfb1469e2ed077db2fc225ea