Skip to content

Commit

Permalink
localhost-to-dockerhub: Remove inapplicable RepoDigests check
Browse files Browse the repository at this point in the history
Checking RepoDigests is only possible if the images are retained in the
local Docker host (different from the local registry).
That is not the case anymore with buildx build --push.

An equivalent error should arise from copy-image() if the image is not
first pushed to the local registry.
  • Loading branch information
victorlin authored Sep 29, 2022
1 parent 2354f10 commit 53d2356
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions devel/localhost-to-dockerhub
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
# This pushes just the provided tag. If "latest" is provided as a second argument,
# the provided tag will also be pushed as "latest"
#
# Errors if any of the tagged images have already been pushed.
#
set -euo pipefail

if [[ $# -lt 1 ]]; then
Expand All @@ -19,11 +17,6 @@ tag=$1
BASE_IMAGE="nextstrain/base"
BASE_BUILDER_IMAGE="nextstrain/base-builder"

if [[ $(docker image inspect --format "{{.RepoDigests}}" $BASE_IMAGE:$tag) != '[]' || $(docker image inspect --format "{{.RepoDigests}}" $BASE_BUILDER_IMAGE:$tag) != '[]' ]]; then
echo "At least one of $BASE_IMAGE:$tag and $BASE_BUILDER_IMAGE:$tag has already been pushed. This can happen if the newly built image is not available in the local registry." >&2
exit 1
fi


# Use Skopeo via a Docker container to copy a tagged image.
# https://github.com/containers/skopeo/blob/07da29fd371dd88615a0b86e91c6824237484172/install.md#container-images
Expand Down

0 comments on commit 53d2356

Please sign in to comment.