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 launch a Jupyter kernel inside the container, it is running on localhost:8888
(and does not find a browser). I used the command jupyter notebook
But from my host, what is the IP address I have to use to work with Jupyter in host's browser ?
With the command ifconfig
, I find eth0
, docker
, wlan0
, lo
...
Thanks !
you can run jupyter notebook --no-browser --ip="<remote server ip>" on your remote machine terminal. And access notebooks using http://:8888/?token=<> from your browser on local machine.
You need to run your notebook on 0.0.0.0
: jupyter notebook -i 0.0.0.0
. Running on localhost make it available only from inside the container.
Host machine: docker run -it -p 8888:8888 image:version
Inside the Container : jupyter notebook --ip 0.0.0.0 --no-browser --allow-root
Host machine access this url : localhost:8888/tree
When you are logging in for the first time there will be a link displayed on the terminal to log on with a token.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With