Hi, I’m trying to build and push arm64 image to AWS ECR and the pipeline failed at Build Docker Image with buildx step w/ following error:
dev: Pulling from *******
no matching manifest for linux/arm64 in the manifest list entries
Exited with code exit status 1
Below is my circleci config:
version: 2.1
orbs:
go: circleci/go@3.0.2
aws-cli: circleci/aws-cli@5.3.4
aws-ecr: circleci/aws-ecr@9.5.1
jobs:
test:
machine:
image: ubuntu-2204:2024.05.1
steps:
- checkout
- go/install:
version: 1.24.2
- go/mod-download-cached
- go/test:
covermode: atomic
failfast: true
race: true
build-and-push:
docker:
- image: cimg/aws:2025.01
steps:
- checkout
- setup_remote_docker
- aws-ecr/build_and_push_image:
account_id: ${AWS_ACCOUNT_ID}
auth:
- aws-cli/setup:
role_arn: ${AWS_ROLE_ARN}
region: ${AWS_DEFAULT_REGION}
profile_name: ${AWS_PROFILE_NAME}
role_session_name: build_and_push_image
platform: linux/arm64
profile_name: ${AWS_PROFILE_NAME}
region: ${AWS_DEFAULT_REGION}
repo: ${ECR_REPOSITORY_NAME}
repo_scan_on_push: true
skip_when_tags_exist: true
tag: "${CIRCLE_SHA1},${CIRCLE_BRANCH}"
workflows:
test-build-and-push:
jobs:
- test
- build-and-push:
context: ctx
requires:
- test
I tried to create another pipeline w/ nearly identical config (remove the test step) and that pipeline surprisingly passed:
+ docker buildx ls
+ grep -q DLC_builder
+ docker buildx create --name DLC_builder --use
DLC_builder
+ echo 'Context is set to DLC_builder'
Context is set to DLC_builder
+ set +x
+ docker buildx build -f ./Dockerfile -t ************.dkr.ecr.**************.amazonaws.com/*******:aa032ce39d15d2c55f0ef41f7372715f13f84bed -t ************.dkr.ecr.**************.amazonaws.com/*******:main --platform linux/arm64 --progress plain --load .
#0 building with "DLC_builder" instance using docker-container driver
....
Any idea what’s the reason and how to fix it ?
Thanks for the help