Skip to content

Commit

Permalink
Merge pull request #1764 from mathbunnyru/asalikhov/better_doc_for_tags
Browse files Browse the repository at this point in the history
Improve docs about tags
  • Loading branch information
mathbunnyru authored Aug 6, 2022
2 parents 0fd03d9 + 064599f commit 911ef45
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 26 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ The [User Guide on ReadTheDocs](https://jupyter-docker-stacks.readthedocs.io/en/

**Example 1:**

This command pulls the `jupyter/scipy-notebook` image tagged `807999a41207` from Docker Hub if it is not already present on the local host.
This command pulls the `jupyter/scipy-notebook` image tagged `0fd03d9356de` from Docker Hub if it is not already present on the local host.
It then starts a container running a Jupyter Server and exposes the container's internal port `8888` to port `10000` of the host machine:

```bash
docker run -p 10000:8888 jupyter/scipy-notebook:807999a41207
docker run -p 10000:8888 jupyter/scipy-notebook:0fd03d9356de
```

You can modify the port on which the container's port is exposed by [changing the value of the `-p` option](https://docs.docker.com/engine/reference/run/#expose-incoming-ports) to `-p 8888:8888`.
Expand All @@ -45,11 +45,11 @@ The container remains intact for restart after the Jupyter Server exits.

**Example 2:**

This command pulls the `jupyter/datascience-notebook` image tagged `807999a41207` from Docker Hub if it is not already present on the local host.
This command pulls the `jupyter/datascience-notebook` image tagged `0fd03d9356de` from Docker Hub if it is not already present on the local host.
It then starts an _ephemeral_ container running a Jupyter Server and exposes the server on host port 10000.

```bash
docker run -it --rm -p 10000:8888 -v "${PWD}":/home/jovyan/work jupyter/datascience-notebook:807999a41207
docker run -it --rm -p 10000:8888 -v "${PWD}":/home/jovyan/work jupyter/datascience-notebook:0fd03d9356de
```

The use of the `-v` flag in the command mounts the current working directory on the host (`${PWD}` in the example command) as `/home/jovyan/work` in the container.
Expand Down
4 changes: 2 additions & 2 deletions binder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# https://hub.docker.com/r/jupyter/base-notebook/tags
ARG OWNER=jupyter
ARG BASE_CONTAINER=$OWNER/base-notebook:807999a41207
ARG BASE_CONTAINER=$OWNER/base-notebook:0fd03d9356de
FROM $BASE_CONTAINER

LABEL maintainer="Jupyter Project <[email protected]>"
Expand All @@ -12,6 +12,6 @@ LABEL maintainer="Jupyter Project <[email protected]>"
# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ENV TAG="807999a41207"
ENV TAG="0fd03d9356de"

COPY --chown=${NB_UID}:${NB_GID} binder/README.ipynb "${HOME}"/README.ipynb
12 changes: 6 additions & 6 deletions docs/using/recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Create a new Dockerfile like the one shown below.

```dockerfile
# Start from a core stack version
FROM jupyter/datascience-notebook:807999a41207
FROM jupyter/datascience-notebook:0fd03d9356de
# Install in the default python3 environment
RUN pip install --quiet --no-cache-dir 'flake8==3.9.2' && \
fix-permissions "${CONDA_DIR}" && \
Expand All @@ -48,7 +48,7 @@ Next, create a new Dockerfile like the one shown below.

```dockerfile
# Start from a core stack version
FROM jupyter/datascience-notebook:807999a41207
FROM jupyter/datascience-notebook:0fd03d9356de
# Install from requirements.txt file
COPY --chown=${NB_UID}:${NB_GID} requirements.txt /tmp/
RUN pip install --quiet --no-cache-dir --requirement /tmp/requirements.txt && \
Expand All @@ -60,7 +60,7 @@ For conda, the Dockerfile is similar:

```dockerfile
# Start from a core stack version
FROM jupyter/datascience-notebook:807999a41207
FROM jupyter/datascience-notebook:0fd03d9356de
# Install from requirements.txt file
COPY --chown=${NB_UID}:${NB_GID} requirements.txt /tmp/
RUN mamba install --yes --file /tmp/requirements.txt && \
Expand Down Expand Up @@ -283,7 +283,7 @@ To use a specific version of JupyterHub, the version of `jupyterhub` in your ima
version in the Hub itself.

```dockerfile
FROM jupyter/base-notebook:807999a41207
FROM jupyter/base-notebook:0fd03d9356de
RUN pip install --quiet --no-cache-dir jupyterhub==1.4.1 && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
Expand Down Expand Up @@ -474,15 +474,15 @@ For JupyterLab:

```bash
docker run -it --rm \
jupyter/base-notebook:807999a41207 \
jupyter/base-notebook:0fd03d9356de \
start.sh jupyter lab --LabApp.token=''
```

For jupyter classic:

```bash
docker run -it --rm \
jupyter/base-notebook:807999a41207 \
jupyter/base-notebook:0fd03d9356de \
start.sh jupyter notebook --NotebookApp.token=''
```

Expand Down
14 changes: 7 additions & 7 deletions docs/using/running.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ The following are some common patterns.

**Example 1:**

This command pulls the `jupyter/scipy-notebook` image tagged `807999a41207` from Docker Hub if it is not already present on the local host.
This command pulls the `jupyter/scipy-notebook` image tagged `0fd03d9356de` from Docker Hub if it is not already present on the local host.
It then starts a container running a Jupyter Notebook server and exposes the server on host port 8888.
The server logs appear in the terminal and include a URL to the notebook server.

```bash
docker run -it -p 8888:8888 jupyter/scipy-notebook:807999a41207
docker run -it -p 8888:8888 jupyter/scipy-notebook:0fd03d9356de

# Entered start.sh with args: jupyter lab

Expand All @@ -39,7 +39,7 @@ Pressing `Ctrl-C` twice shuts down the notebook server but leaves the container
# list containers
docker ps -a
# CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
# 221331c047c4 jupyter/scipy-notebook:807999a41207 "tini -g -- start-no…" 11 seconds ago Exited (0) 8 seconds ago cranky_benz
# 221331c047c4 jupyter/scipy-notebook:0fd03d9356de "tini -g -- start-no…" 11 seconds ago Exited (0) 8 seconds ago cranky_benz

# start the stopped container
docker start -a 221331c047c4
Expand All @@ -53,12 +53,12 @@ docker rm 221331c047c4

**Example 2:**

This command pulls the `jupyter/r-notebook` image tagged `807999a41207` from Docker Hub if it is not already present on the local host.
This command pulls the `jupyter/r-notebook` image tagged `0fd03d9356de` from Docker Hub if it is not already present on the local host.
It then starts a container running a Jupyter Notebook server and exposes the server on host port 10000.
The server logs appear in the terminal and include a URL to the notebook server, but with the internal container port (8888) instead of the correct host port (10000).

```bash
docker run -it --rm -p 10000:8888 -v "${PWD}":/home/jovyan/work jupyter/r-notebook:807999a41207
docker run -it --rm -p 10000:8888 -v "${PWD}":/home/jovyan/work jupyter/r-notebook:0fd03d9356de
```

Pressing `Ctrl-C` twice shuts down the notebook server and immediately destroys the Docker container.
Expand Down Expand Up @@ -130,7 +130,7 @@ subuidSize=$(( $(podman info --format "{{ range .Host.IDMappings.UIDMap }}+{{.Si
subgidSize=$(( $(podman info --format "{{ range .Host.IDMappings.GIDMap }}+{{.Size }}{{end }}" ) - 1 ))
```

This command pulls the `docker.io/jupyter/r-notebook` image tagged `807999a41207` from Docker Hub if it is not already present on the local host.
This command pulls the `docker.io/jupyter/r-notebook` image tagged `0fd03d9356de` from Docker Hub if it is not already present on the local host.
It then starts a container running a Jupyter Server and exposes the server on host port 10000.
The server logs appear in the terminal and include a URL to the notebook server, but with the internal container port (8888) instead of the correct host port (10000).

Expand All @@ -139,7 +139,7 @@ podman run -it --rm -p 10000:8888 \
-v "${PWD}":/home/jovyan/work --user $uid:$gid \
--uidmap $uid:0:1 --uidmap 0:1:$uid --uidmap $(($uid+1)):$(($uid+1)):$(($subuidSize-$uid)) \
--gidmap $gid:0:1 --gidmap 0:1:$gid --gidmap $(($gid+1)):$(($gid+1)):$(($subgidSize-$gid)) \
docker.io/jupyter/r-notebook:807999a41207
docker.io/jupyter/r-notebook:0fd03d9356de
```

```{warning}
Expand Down
12 changes: 9 additions & 3 deletions docs/using/selecting.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,15 @@ Every Monday and whenever a pull request is merged, images are rebuilt and pushe
Whenever a docker image is pushed to the container registry, it is tagged with:

- a `latest` tag
- a 12-character git commit SHA like `b9f6ce795cfc`
- a date formatted like `2021-08-29`
- a set of software version tags like `python-3.9.6` and `lab-3.0.16`
- a 12-character git commit SHA like `0fd03d9356de`
- a date formatted like `2022-08-04`
- OS version like `ubuntu-22.04`
- a set of software version tags like `python-3.10.5` and `lab-3.4.4`

```{warning}
- Tags before `2022-07-05` were sometimes incorrect. Please, do not rely on them.
- All `arm64` images have _aarch64-_ tag prefix, for example `aarch64-python-3.10.5`.
```

For stability and reproducibility, you should either reference a date formatted
tag from a date before the current date (in UTC time) or a git commit SHA older
Expand Down
2 changes: 1 addition & 1 deletion examples/docker-compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ You can customize the docker-stack notebook image to deploy by modifying the `no
For example, you can build and deploy a `jupyter/all-spark-notebook` by modifying the Dockerfile like so:

```dockerfile
FROM jupyter/all-spark-notebook:807999a41207
FROM jupyter/all-spark-notebook:0fd03d9356de
# Your RUN commands and so on
```

Expand Down
2 changes: 1 addition & 1 deletion examples/docker-compose/notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Distributed under the terms of the Modified BSD License.

# Pick your favorite docker-stacks image
FROM jupyter/minimal-notebook:807999a41207
FROM jupyter/minimal-notebook:0fd03d9356de

USER root

Expand Down
2 changes: 1 addition & 1 deletion examples/make-deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Distributed under the terms of the Modified BSD License.

# Pick your favorite docker-stacks image
FROM jupyter/minimal-notebook:807999a41207
FROM jupyter/minimal-notebook:0fd03d9356de

USER root

Expand Down
2 changes: 1 addition & 1 deletion tagging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The main purpose of the source code in this folder is to properly tag all the im
These two processes are closely related, so the source code is widely reused.

Basic example of a tag is a `python` version tag.
For example, an image `jupyter/base-notebook` with `python 3.8.8` will have a tag `jupyter/base-notebook:python-3.8.8`.
For example, an image `jupyter/base-notebook` with `python 3.10.5` will have a tag `jupyter/base-notebook:python-3.10.5`.
This tag (and all the other tags) are pushed to Docker Hub.

Manifest is a description of some important part of the image in a `markdown`.
Expand Down

0 comments on commit 911ef45

Please sign in to comment.