Docker containers for Jupyter. For a standalone, single user Notebook app, see ptimof/notebook.
docker build -t ptimof/ipython 0-ipython
docker build -t ptimof/scipystack 1-scipystack
docker build -t ptimof/ipython-extras 2-ipython-extras
docker build -t ptimof/notebook 3-notebook # optional
docker build -t ptimof/systemuser 4-systemuser
docker build -t ptimof/jupyterhub 5-jupyterhub
Alternatively, you may wish to pull these images from Docker Hub:
docker pull ptimof/jupyterhub
docker pull ptimof/systemuser
If a GitHub application has not yet been created, it can be created here. Make sure the callback URL is:
http://[your_host:8000]/hub/oauth_callback
For example, example.com:8000
.
Create a file env
in a directory that contains the details from
the GitHub application:
GITHUB_CLIENT_ID=<client_id>
GITHUB_CLIENT_SECRET=<client_secret>
OAUTH_CALLBACK_URL=http://[your_host:8000]/hub/oauth_callback
Ensure that this file is only readable by root
:
chmod 0440 /usr/local/etc/jupyterhub/env
docker run -d -p 8000:8000 -v /var/run/docker.sock:/docker.sock -v /etc/passwd:/srv/jupyterhub/userlist --env-file /usr/local/etc/jupyter/env --net=host --name jupyterhub ptimof/jupyterhub
- If a browser ends up stuck re-directing when attempting to use a server, it probably means that the
user container needs to be removed. Have the user log out of JupyterHub, and Execute
docker rm jupyter-[user]
.