emdi
emdi

Reputation: 489

Running Jupyter notebook in Docker

I want to run jupyter in docker container. I am not able to launch the jupyter notebook. When I copy paste the URL given in the terminal.. server cannot be reached. Will appreciate any ideas to try

enter image description here

Upvotes: 4

Views: 8246

Answers (2)

kartheek
kartheek

Reputation: 696

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.

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. Then

replace the host name in the url given in terminal with localhost like this 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. Ex. http://localhost:80/\?token\=<TOKEN>\&token\=<TOKEN>

Upvotes: 1

Bob Baxley
Bob Baxley

Reputation: 3761

You are forwarding port 8080 in the docker run call with -p 8080:8080. But you also need to forward port 8888 by adding -p 8888:8888. More specifically, you want to run:

docker -it -p 8080:8080 -p 8888:8888 jupyter/minimal-notebook

Upvotes: 1

Related Questions