Hi there,
We have pushed a multi-architecture Docker-image to AWS ECR and using it to generate other images.
This is how the image and manifests look like on AWS ECR:
% docker buildx imagetools inspect xxxx.dkr.ecr.us-east-1.amazonaws.com/my-image:2.8.1-pg14
Name: xxxx.dkr.ecr.us-east-1.amazonaws.com/my-image:2.8.1-pg14
MediaType: application/vnd.docker.distribution.manifest.list.v2+json
Digest: sha256:59370d981db57776e336a97685c9a3930cf8227cdcbe86e6a19ce5665ab5f455
Manifests:
Name: xxxx.dkr.ecr.us-east-1.amazonaws.com/my-image:2.8.1-pg14@sha256:e32ab6eb62bdfa2f639dac598987ef4f3a1557ed6eb459bc319734a540295224
MediaType: application/vnd.docker.distribution.manifest.v2+json
Platform: linux/arm64
Name: xxxx.dkr.ecr.us-east-1.amazonaws.com/my-image:2.8.1-pg14@sha256:1f977546f6d8b61a8fdb7d9b78873efa34e643430b8e02a4a223a890a9d771e1
MediaType: application/vnd.docker.distribution.manifest.v2+json
Platform: linux/amd64
Then we have a very simple Dockerfile
, which builds the final image for each architecture:
FROM --platform=linux/arm64 xxxx.dkr.ecr.us-east-1.amazonaws.com/my-image:2.8.1-pg14
COPY xxx.txt /etc/conf
The image gets build but the architecture is wrong. AWS ECR seems to ignore the --platform=linux/arm64
attribute in FROM
and uses linux/amd64
instead.
Is this not supported on AWS ECR?
Thanks
FYI: The same approach works flawlessly when the multi-architecture image is stored in Docker Hub.