From 80cb879cb71cfe0c314e803b130e23cba58a0861 Mon Sep 17 00:00:00 2001 From: Josh W Lewis Date: Mon, 4 Mar 2024 11:45:28 -0600 Subject: [PATCH 1/2] Create copied manifest rather than retagging (#252) --- bin/publish-to-registries.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/publish-to-registries.sh b/bin/publish-to-registries.sh index fc62c521..70a2c717 100755 --- a/bin/publish-to-registries.sh +++ b/bin/publish-to-registries.sh @@ -16,13 +16,19 @@ 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}" - docker tag "${source}" "${target}" + if (( STACK_VERSION < 24 )); then + # Re-tag amd64-only images + docker tag "${source}" "${target}" + else + # Make a carbon copy image index for multi-arch images + docker buildx imagetools create -t "${target}" "${source}" + fi docker push "${target}" done } From dc7eac7cc1b1fa38697a554ed40eb42d9c882ef7 Mon Sep 17 00:00:00 2001 From: Josh W Lewis Date: Mon, 4 Mar 2024 13:33:11 -0600 Subject: [PATCH 2/2] Don't docker push image manifest (#253) --- bin/publish-to-registries.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/publish-to-registries.sh b/bin/publish-to-registries.sh index 70a2c717..f2b2e38d 100755 --- a/bin/publish-to-registries.sh +++ b/bin/publish-to-registries.sh @@ -25,11 +25,11 @@ push_group() { if (( STACK_VERSION < 24 )); 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 - docker push "${target}" done }