Copilot-cli: Support building on ARM Macs

Created on 21 Feb 2021  路  2Comments  路  Source: aws/copilot-cli

Today, when customers deploy their service, copilot builds the container image and pushes it. Customers using ARM macs end up having ARM based images built and pushed. These images cannot run on Fargate and lead to a confusing and poor customer experience. I propose:

  1. First, bailing out early if the image architecture cannot run on Fargate
  2. Support building the image according to the target architecture. Currently Fargate only supports x86 so we should target that (or AMD64).

https://github.com/aws/copilot-cli/issues/1948

https://twitter.com/elliottkember/status/1361169248488316932?s=21

platformacOS sizM typenhancement

Most helpful comment

I'm dropping this for those who are encountering this issue - in other words, for users who are using M1 Macs and want to deploy/run x86 container images.

As a workaround today, you can deploy your apps through pipelines (copilot pipeline init and copilot pipeline update to create it) instead of copilot svc deploy.

(I +100'd on this issue to support multiple targets 馃槏)

Another possible workaround, but this time it doesn't need pipelines.

Set linux/amd64 to the DOCKER_DEFAULT_PLATFORM environment variable, and you will be able to build and run x86 container image successfully via copilot svc deploy as follows:

$ DOCKER_DEFAULT_PLATFORM=linux/amd64 copilot svc deploy

All 2 comments

I'm dropping this for those who are encountering this issue - in other words, for users who are using M1 Macs and want to deploy/run x86 container images.

As a workaround today, you can deploy your apps through pipelines (copilot pipeline init and copilot pipeline update to create it) instead of copilot svc deploy.

(I +100'd on this issue to support multiple targets 馃槏)

I'm dropping this for those who are encountering this issue - in other words, for users who are using M1 Macs and want to deploy/run x86 container images.

As a workaround today, you can deploy your apps through pipelines (copilot pipeline init and copilot pipeline update to create it) instead of copilot svc deploy.

(I +100'd on this issue to support multiple targets 馃槏)

Another possible workaround, but this time it doesn't need pipelines.

Set linux/amd64 to the DOCKER_DEFAULT_PLATFORM environment variable, and you will be able to build and run x86 container image successfully via copilot svc deploy as follows:

$ DOCKER_DEFAULT_PLATFORM=linux/amd64 copilot svc deploy
Was this page helpful?
0 / 5 - 0 ratings