From ab8dcfd20fe3baccc22cabb33d577fab7171226f Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Thu, 26 Oct 2023 11:28:02 +0530 Subject: [PATCH] Switch default image to quay.io Bump up a couple other versions in the Dockerfile examples as well. Ref https://github.com/jupyterhub/team-compass/issues/688 --- dockerspawner/dockerspawner.py | 4 ++-- docs/source/docker-image.md | 14 +++++++------- examples/internal-ssl/.env | 2 +- tests/conftest.py | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dockerspawner/dockerspawner.py b/dockerspawner/dockerspawner.py index eca7fe4f..697db9f2 100644 --- a/dockerspawner/dockerspawner.py +++ b/dockerspawner/dockerspawner.py @@ -196,13 +196,13 @@ def _ip_default(self): return "0.0.0.0" container_image = Unicode( - "jupyterhub/singleuser:%s" % _jupyterhub_xy, + "quay.io/jupyterhub/singleuser:%s" % _jupyterhub_xy, help="Deprecated, use ``DockerSpawner.image``.", config=True, ) image = Unicode( - "jupyterhub/singleuser:%s" % _jupyterhub_xy, + "quay.io/jupyterhub/singleuser:%s" % _jupyterhub_xy, config=True, help="""The image to use for single-user servers. diff --git a/docs/source/docker-image.md b/docs/source/docker-image.md index 161e6af8..656e15f1 100644 --- a/docs/source/docker-image.md +++ b/docs/source/docker-image.md @@ -1,6 +1,6 @@ # Picking or building a Docker image -By default, DockerSpawner uses the `jupyterhub/singleuser` image +By default, DockerSpawner uses the `quay.io/jupyterhub/singleuser` image with the appropriate tag that pins the right version of JupyterHub, but you can also build your own image. @@ -13,7 +13,7 @@ and are encouraged as the image of choice. Make sure to pick a tag! Example: ```python -c.DockerSpawner.image = 'jupyter/scipy-notebook:67b8fb91f950' +c.DockerSpawner.image = 'quay.io/jupyter/scipy-notebook:2023-10-23' ``` The docker-stacks are moving targets with always changing versions. @@ -37,8 +37,8 @@ the appropriate JupyterHub version and the Jupyter notebook package. For instance, from the docker-stacks, pin your JupyterHub version and you are done: ```Dockerfile -FROM jupyter/scipy-notebook:67b8fb91f950 -ARG JUPYTERHUB_VERSION=1.3.0 +FROM quay.io/jupyter/scipy-notebook:67b8fb91f950 +ARG JUPYTERHUB_VERSION=4.0.2 RUN pip3 install --no-cache \ jupyterhub==$JUPYTERHUB_VERSION ``` @@ -48,10 +48,10 @@ Or for the absolute minimal JupyterHub user image starting only from the base Py **NOTE: make sure to pick the jupyterhub version you are using!** ```Dockerfile -FROM python:3.8 +FROM python:3.11 RUN pip3 install \ - 'jupyterhub==1.3.*' \ - 'notebook==6.*' + 'jupyterhub==4.*' \ + 'notebook==7.*' # create a user, since we don't want to run as root RUN useradd -m jovyan diff --git a/examples/internal-ssl/.env b/examples/internal-ssl/.env index 5a8fad4a..02d8327a 100644 --- a/examples/internal-ssl/.env +++ b/examples/internal-ssl/.env @@ -13,7 +13,7 @@ DOCKER_MACHINE_NAME=jupyterhub DOCKER_NETWORK_NAME=jupyterhub # Single-user Jupyter Notebook server container image -DOCKER_NOTEBOOK_IMAGE=jupyterhub/singleuser:4 +DOCKER_NOTEBOOK_IMAGE=quay.io/jupyterhub/singleuser:4 # Name of JupyterHub container data volume DATA_VOLUME_HOST=jupyterhub-data diff --git a/tests/conftest.py b/tests/conftest.py index adaabdb5..0db1f925 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -63,7 +63,7 @@ def app(jupyterhub_app): # noqa: F811 # If it's a prerelease e.g. (2, 0, 0, 'rc4', '') use full tag if len(jh_version_info) > 3 and jh_version_info[3]: tag = jupyterhub.__version__ - app.config.DockerSpawner.image = f"jupyterhub/singleuser:{tag}" + app.config.DockerSpawner.image = f"quay.io/jupyterhub/singleuser:{tag}" return app