dockercontainersjupyter-notebook

Running ipython notebook in a Docker Container


Can someone share the steps to run iPython notebook in a container.

I tried to run ipython notebook command in my ubuntu 14.04 container shell. The only problem is that it can not find a web browser to open on, since containers only work for service applications instead of interactive ones.

Any suggestions?


Solution

  • When you start the container, you can specify port forwarding via the -p option. For example, run:

    docker run -it -p 8888:8888 mxnet/python bash
    

    Then when starting the notebook, specify the port:

    ipython notebook --port=8888 --no-browser --ip='*' & 
    

    Then navigate to the appropriate IP in your browser (typically localhost or 127.0.0.1).