Docker Community Forums

Share and learn in the Docker community.

Problem accessing jupyter notebook from Docker Container

Hello everyone,

I just set up a Docker Container with the Docker Toolbox and ran jupyter notebook inside the container using

docker run --name container -v %somedirectory%:%someotherdir% -d -p 127.0.0.1:8888:8888 quay.io/fenicsproject/stable:2017.2.0 'jupyter-notebook --ip=0.0.0.0'

Afterwards I can check the log of the container to see the URL and token that jupyter notebook created.

If I now go ahead and copy the link to my browser, it won’t be able to connect to localhost. Accessing 127.0.0.1 does not work either.

Since the Docker Toolbox relies on Virtual Box VMs, I also tried to use the IP address of the VM, in this case 192.168.99.100:2376. According to the Kitematic UI, this is the IP:Port combination that is being published by the docker-machine and indeed this does not lead to a generic connection error. Instead the browser’s output is:

Client sent an HTTP request to an HTTPS server.

I don’t really know what to do from this point on. What does this “error” mean? Does it even make sense to use the VM’s IP address? And most importlanty: what else can I do in order to finally get access to the jupyter notebook?

I hope someone can help, thank you very much in advance.

The problem can be fixed by leaving out the “127.0.0.1” and then using the IP of the docker-machine in the browser.