File tree Expand file tree Collapse file tree 5 files changed +23
-8
lines changed Expand file tree Collapse file tree 5 files changed +23
-8
lines changed Original file line number Diff line number Diff line change 77# are not set in the shell environment.
88
99# To override these values, set the shell environment variables.
10+ JUPYTERHUB_VERSION = 0.8.0
1011
1112# Name of Docker machine
1213DOCKER_MACHINE_NAME = jupyterhub
@@ -15,7 +16,10 @@ DOCKER_MACHINE_NAME=jupyterhub
1516DOCKER_NETWORK_NAME = jupyterhub-network
1617
1718# Single-user Jupyter Notebook server container image
18- DOCKER_NOTEBOOK_IMAGE = jupyter/scipy-notebook:8f56e3c47fec
19+ DOCKER_NOTEBOOK_IMAGE = jupyter/minimal-notebook:e1677043235c
20+
21+ # the local image we use, after pinning jupyterhub version
22+ LOCAL_NOTEBOOK_IMAGE = jupyterhub-user
1923
2024# Notebook directory in the container.
2125# This will be /home/jovyan/work if the default
Original file line number Diff line number Diff line change 11# Copyright (c) Jupyter Development Team.
22# Distributed under the terms of the Modified BSD License.
3- FROM jupyterhub/jupyterhub-onbuild:0.7.2
3+ ARG JUPYTERHUB_VERSION
4+ FROM jupyterhub/jupyterhub-onbuild:$JUPYTERHUB_VERSION
45
56# Install dockerspawner, oauth, postgres
6- RUN /opt/conda/bin/conda install psycopg2=2.7 && \
7+ RUN /opt/conda/bin/conda install -yq psycopg2=2.7 && \
78 /opt/conda/bin/conda clean -tipsy && \
8- /opt/conda/bin/pip install \
9- oauthenticator==0.6 .* \
10- dockerspawner==0.8 .*
9+ /opt/conda/bin/pip install --no-cache-dir \
10+ oauthenticator==0.7 .* \
11+ dockerspawner==0.9 .*
1112
1213# Copy TLS certificate and key
1314ENV SSL_CERT /srv/jupyterhub/secrets/jupyterhub.crt
Original file line number Diff line number Diff line change @@ -50,7 +50,11 @@ check-files: userlist $(cert_files) secrets/oauth.env secrets/postgres.env
5050pull :
5151 docker pull $(DOCKER_NOTEBOOK_IMAGE )
5252
53- notebook_image : pull
53+ notebook_image : pull singleuser/Dockerfile
54+ docker build -t $(LOCAL_NOTEBOOK_IMAGE ) \
55+ --build-arg JUPYTERHUB_VERSION=$(JUPYTERHUB_VERSION ) \
56+ --build-arg DOCKER_NOTEBOOK_IMAGE=$(DOCKER_NOTEBOOK_IMAGE ) \
57+ singleuser
5458
5559build : check-files network volumes
5660 docker-compose build
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ services:
2323 build :
2424 context : .
2525 dockerfile : Dockerfile.jupyterhub
26+ args :
27+ JUPYTERHUB_VERSION : ${JUPYTERHUB_VERSION}
2628 restart : always
2729 image : jupyterhub
2830 container_name : jupyterhub
@@ -40,7 +42,7 @@ services:
4042 # All containers will join this network
4143 DOCKER_NETWORK_NAME : ${DOCKER_NETWORK_NAME}
4244 # JupyterHub will spawn this Notebook image for users
43- DOCKER_NOTEBOOK_IMAGE : ${DOCKER_NOTEBOOK_IMAGE }
45+ DOCKER_NOTEBOOK_IMAGE : ${LOCAL_NOTEBOOK_IMAGE }
4446 # Notebook directory inside user image
4547 DOCKER_NOTEBOOK_DIR : ${DOCKER_NOTEBOOK_DIR}
4648 # Using this run command (optional)
Original file line number Diff line number Diff line change 1+ ARG DOCKER_NOTEBOOK_IMAGE
2+ FROM $DOCKER_NOTEBOOK_IMAGE
3+ ARG JUPYTERHUB_VERSION
4+ RUN python3 -m pip install --no-cache jupyterhub==$JUPYTERHUB_VERSION
You can’t perform that action at this time.
0 commit comments