Skip to content

Commit f87faff

Browse files
Pass --platform to docker pull when the tag exists (#343)
1 parent f2ca76c commit f87faff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scripts/docker_buildx.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ for tag in "${DOCKER_TAGS[@]}"; do
4444
if [ "${AWS_ECR_BOOL_SKIP_WHEN_TAGS_EXIST}" -eq "1" ] || [ "${AWS_ECR_BOOL_SKIP_WHEN_TAGS_EXIST}" = "true" ]; then
4545
docker_tag_exists_in_ecr=$(aws "${ECR_COMMAND}" describe-images --profile "${AWS_ECR_EVAL_PROFILE_NAME}" --registry-id "${AWS_ECR_EVAL_ACCOUNT_ID}" --region "${AWS_ECR_EVAL_REGION}" --repository-name "${AWS_ECR_EVAL_REPO}" --query "contains(imageDetails[].imageTags[], '${tag}')")
4646
if [ "${docker_tag_exists_in_ecr}" = "true" ]; then
47-
docker pull "${AWS_ECR_VAL_ACCOUNT_URL}/${AWS_ECR_EVAL_REPO}:${tag}"
47+
docker pull "${AWS_ECR_VAL_ACCOUNT_URL}/${AWS_ECR_EVAL_REPO}:${tag}" --platform "${AWS_ECR_EVAL_PLATFORM}"
4848
number_of_tags_in_ecr=$((number_of_tags_in_ecr += 1))
4949
fi
5050
fi

0 commit comments

Comments
 (0)