Access Jupyter notebook running on Docker container

前端 未结 10 1415
南旧
南旧 2021-01-30 00:21

I created a docker image with python libraries and Jupyter. I start the container with the option -p 8888:8888, to link ports between host and container. When I l

10条回答
  •  旧巷少年郎
    2021-01-30 00:32

    The docker run command is mandatory to open a port for the container to allow the connection from a host browser, assigning the port to the docker container with -p, select your jupyter image from your docker images.

    docker run -it -p 8888:8888 image:version
    

    Inside the container launch the notebook assigning the port you opened:

    jupyter notebook --ip 0.0.0.0 --port 8888 --no-browser --allow-root
    

    Access the notebook through your desktops browser on http://localhost:8888 The notebook will prompt you for a token which was generated when you create the notebook.

提交回复
热议问题