Skip to content

Commit 88c30f4

Browse files
committedNov 23, 2023
Publish to Docker Hub alongside Quay.io
1 parent 656d7c0 commit 88c30f4

File tree

3 files changed

+21
-36
lines changed

3 files changed

+21
-36
lines changed
 

‎.github/workflows/publish.yml

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ jobs:
109109
if: steps.publishing.outputs.publishing
110110
run: |
111111
docker login -u "${{ secrets.QUAY_USERNAME }}" -p "${{ secrets.QUAY_PASSWORD }}" quay.io
112+
docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_PASSWORD }}" docker.io
112113
113114
- name: Configure a git user
114115
# Having a user.email and user.name configured with git is required to

‎ci/publish

+8-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
# Exit on errors, assert env vars, log commands
77
set -eux
88

9-
PUBLISH_ARGS="--push --publish-chart \
9+
PUBLISH_ARGS="--push \
1010
--builder docker-buildx \
1111
--platform linux/amd64 --platform linux/arm64 \
12-
"
12+
"
1313

1414
# chartpress use git to push to our Helm chart repository, which is the gh-pages
1515
# branch of jupyterhub/helm-chart. We have installed a private SSH key within
@@ -33,13 +33,17 @@ if [[ $GITHUB_REF != refs/tags/* ]]; then
3333
EXTRA_MESSAGE="${GITHUB_REPOSITORY}${PR_OR_HASH} ${LATEST_COMMIT_TITLE}"
3434

3535
# shellcheck disable=SC2086
36-
chartpress $PUBLISH_ARGS --extra-message "${EXTRA_MESSAGE}"
36+
chartpress $PUBLISH_ARGS --extra-message "${EXTRA_MESSAGE}" --publish-chart
37+
# shellcheck disable=SC2086
38+
chartpress $PUBLISH_ARGS --extra-message "${EXTRA_MESSAGE}" --image-prefix=jupyterhub/k8s-
3739
else
3840
# Setting a tag explicitly enforces a rebuild if this tag had already been
3941
# built and we wanted to override it.
4042

4143
# shellcheck disable=SC2086
42-
chartpress $PUBLISH_ARGS --tag "${GITHUB_REF:10}"
44+
chartpress $PUBLISH_ARGS --tag "${GITHUB_REF:10}" --publish-chart
45+
# shellcheck disable=SC2086
46+
chartpress $PUBLISH_ARGS --tag "${GITHUB_REF:10}" --image-prefix=jupyterhub/k8s-
4347
fi
4448

4549
# Let us log the changes chartpress did, it should include replacements for

‎docs/source/changelog.md

+12-32
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,21 @@ changes in pull requests], this list should be updated.
1212
[development releases]: https://hub.jupyter.org/helm-chart/#development-releases-jupyterhub
1313
[breaking changes in pull requests]: https://github.com/jupyterhub/zero-to-jupyterhub-k8s/pulls?q=is%3Apr+is%3Aclosed+label%3Abreaking
1414

15-
### Default image registry moved to [quay.io](https://quay.io)
15+
### Default image registry changed to Quay.io
1616

17-
We have moved the registry where we publish our docker images from [Docker Hub](https://hub.docker.com)
18-
to [Quay.io](https://quay.io). This move is to ensure our users are not [throttled by Docker Hub](https://docs.docker.com/docker-hub/download-rate-limit/),
19-
and us maintainers don't have to apply for 'sponsored OSS Project' from docker each year. This
20-
should have no material impact on your experience.
17+
We now publish the chart's docker images to both [Quay.io] and [Docker Hub] and
18+
the chart is from now configured to use the images at Quay.io by default.
19+
Previous releases of images (excluding pre-releases) has been copied over to
20+
Quay.io as well.
2121

22-
For the benefit of people running older versions of z2jh and are throttled by dockerhub,
23-
we have actually copied all our _released_ images from Docker Hub to Quay.io as well.
24-
So you can opt in to using the images from Quay.io with the following config:
22+
The change is to ensure that images can be pulled without a [Docker Hub rate
23+
limit] even if the [JupyterHub organization on Docker Hub] wouldn't be sponsored
24+
by Docker Hub in the future, something we need to apply for each year.
2525

26-
```yaml
27-
hub:
28-
image:
29-
name: quay.io/jupyterhub/k8s-hub
30-
proxy:
31-
chp:
32-
image:
33-
name: quay.io/jupyterhub/configurable-http-proxy
34-
secretSync:
35-
image:
36-
name: quay.io/jupyterhub/k8s-secret-sync
37-
singleuser:
38-
networkTools:
39-
image:
40-
name: quay.io/jupyterhub/k8s-network-tools
41-
prePuller:
42-
hook:
43-
image:
44-
name: quay.io/jupyterhub/k8s-image-awaiter
45-
```
46-
47-
You don't have to explicitly specify the tag, as the existing tags
48-
will work. Note that this **only** works for _released_ versions of
49-
z2jh - if you are using a _dev_ version of z2jh, this will not work.
26+
[docker hub]: https://hub.docker.com
27+
[docker hub rate limit]: https://docs.docker.com/docker-hub/download-rate-limit/
28+
[jupyterhub organization on docker hub]: https://hub.docker.com/u/jupyterhub
29+
[quay.io]: https://quay.io
5030

5131
## 3.1
5232

0 commit comments

Comments
 (0)