File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed
Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -75,10 +75,23 @@ copy_docker_image_to_ecr() {
7575 local dest=" ${ECR_OTELCOL_REPO} :${CHART_APPVERSION} "
7676
7777 echo " ⏳ Copying otelcol image from ${src} to ${dest} ..."
78- docker pull ${src}
79- docker tag ${src} ${dest}
80- ${DRY_RUN_PREFIX} docker push ${dest}
81- echo " ✅ Successfully copied otelcol image: ${src} → ${dest} "
78+
79+ # Get supported Linux architectures from the source manifest and copy each to ECR
80+ local arch_digests=$( docker manifest inspect " ${src} " | jq -c ' .manifests[] | select(.platform.os == "linux")' )
81+ echo " ${arch_digests} " | while read -r manifest; do
82+ local arch=$( echo " ${manifest} " | jq -r ' .platform.architecture' )
83+ local digest=$( echo " ${manifest} " | jq -r ' .digest' )
84+ local src_digest=" ${src_repo} @${digest} "
85+ local dest_arch=" ${dest} -${arch} "
86+ ${DRY_RUN_PREFIX} docker pull " ${src_digest} "
87+ ${DRY_RUN_PREFIX} docker tag " ${src_digest} " " ${dest_arch} "
88+ ${DRY_RUN_PREFIX} docker push " ${dest_arch} "
89+ ${DRY_RUN_PREFIX} docker manifest create " ${dest} " " ${dest_arch} " --amend
90+ ${DRY_RUN_PREFIX} docker manifest annotate " ${dest} " " ${dest_arch} " --os linux --arch " ${arch} "
91+ done
92+
93+ ${DRY_RUN_PREFIX} docker manifest push ${dest}
94+ echo " ✅ Successfully copied multi-arch image: ${src} → ${dest} "
8295}
8396
8497# Function to modify the Helm chart to meet EKS Add-on requirements
You can’t perform that action at this time.
0 commit comments