How to push multi-arch docker image built with docker-compose to ECR

0

I want to dockerize and push my node app in development to a free tier ec2 instance. Unfortunately, they are all x86 instances and my computer is an arm based chip (M1 Apple silicon). I am using a docker-compose.yml file to build my container and also pull other dependent containers from docker hub (redis & postgres). I can't figure out a way to build the docker image to be multi arch with docker buildx, use the docker-compose file and push the generated image to ECR. And as a result of the other containers being pulled, how would that work with ECR, does that mean that the redis and postgres containers will also be pushed to ECR. Is there a better way to achieve this?

3개 답변
0
AWS
전문가
답변함 2년 전
  • Yh. I have seen that. It didn't help for my particular case. I am able to push a multi-arch image to ecr with buildx no problem. The issue arises when i try to build using a docker-compose file. If you look at the question properly, you'll understand.

0

We have good blog covering multi-arch images with ECR. Have you checked that? https://aws.amazon.com/blogs/containers/introducing-multi-architecture-container-images-for-amazon-ecr/ As for free tier, ARM instances also have free tier, for example t4g

Petro_K
답변함 2년 전
  • Yes i have. Doesn't solve my particular use case. Or at least i can't find a solution from that

0

I do multi-arch builds regularly, although not locally in that way (even though I do have arm and x86 machines). I use AWS CodeBuild which is insanely cheap for that.

See this blog post for logical explanations and these repositories for practical examples

profile picture
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠