Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Commit

Permalink
Merge branch 'multiarch-push' into multiarch-push-robuust
Browse files Browse the repository at this point in the history
  • Loading branch information
boboldehampsink committed Mar 5, 2024
2 parents 6a34881 + 48d96ed commit 6a4861c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions bin/publish-to-registries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@ push_group() {
local sourceTagSuffix="$2"
local targetTagSuffix="$3"
variants=("" "-build")
if (( STACK_VERSION <= 22 )); then
if (( STACK_VERSION < 24 )); then
variants+=("-cnb" "-cnb-build")
fi
for variant in "${variants[@]}"; do
source="${tagBase}${variant}${sourceTagSuffix}"
target="${tagBase}${variant}${targetTagSuffix}"
chmod +r "$HOME"/.docker/config.json
docker container run --rm --net host \
-v regctl-conf:/home/appuser/.regctl/ \
-v "$HOME"/.docker/config.json:/home/appuser/.docker/config.json \
regclient/regctl image copy "${source}" "${target}"
if (( STACK_VERSION < 22 )); then
# Re-tag amd64-only images
docker tag "${source}" "${target}"
docker push "${target}"
else
# Make a carbon copy image index for multi-arch images
docker buildx imagetools create -t "${target}" "${source}"
fi
done
}

Expand Down

0 comments on commit 6a4861c

Please sign in to comment.