docker-archive / compose-cli

Easily run your Compose application to the cloud with compose-cli
Apache License 2.0
956 stars 253 forks source link

AWS ECS Fargate ARM64 support #2115

Open thorfi opened 2 years ago

thorfi commented 2 years ago

Description

AWS have just announced support for ARM64 in Fargate:

https://aws.amazon.com/about-aws/whats-new/2021/11/aws-fargate-amazon-ecs-aws-graviton2-processors/

It would be good to have docker compose auto detect platform linux/arm64 and include CpuArchitecture: ARM64 chunk in the CloudFormation template, and also to have the docker/ecs-secrets-sidecar and docker/ecs-searchdomain-sidecar containers built as multi-platform images.

  Resources:
    FooTaskDefinition:
      Properties:
        RuntimePlatform:
          CpuArchitecture: ARM64
thorfi commented 2 years ago

Re-raised in this repository from docker/compose#8958 as instructed.

thorfi commented 2 years ago

Bump

thorfi commented 2 years ago

bump

thorfi commented 2 years ago

bump

JohnPreston commented 2 years ago

@thorfi

This is something supported and implemented in ECS Compose-X

https://docs.compose-x.io/syntax/compose_x/ecs.details/ecs.html#cpuarchitecture

This is what "I call" a service level extension field, which will take care of setting everything in the rendered CloudFormation task/service definitions. If you set a multi-containers "family" then the value needs only setting once, or set everywhere with the same value.

The value is disabled in cloudformation if you change the launch type or capacity providers so that it only works with Fargate.

Hope this helps you in your journey with docker-compose and AWS ECS.

PS: I had been tracking the ECS Plugin to match the compatibility for users like yourself to move from one tool to the other. But I had never seen the x-aws-cloudformation documented :/

stephenhibbert commented 2 years ago

Could I please clarify if I have an arm64 docker image am I able today to run this on ECS Graviton2 in any way whatsoever? Even if I manually specify that it should be run on CpuArchitecture: ARM64 or does compose-cli only support x86 docker images? I haven't been able to find the answer in the documentation, sorry if I missed something.

KymPohl commented 1 year ago

In my case the only item preventing an docker ecs based deployment to aws arm64 is the generated CloudFormation template's reference to the docker/ecs-searchdomain-sidecar:1.0 image within the TaskDefinition section(s). This docker/ecs-searchdomain-sidecar:1.0 image is only built for an amd64 platform. Seems that a simply remedy would just be for Docker to push an arm64 version of this component to docker hub (needs to have the 1.0 tag though unless they change the template generation logic...

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.