From c7ae702965a8cf91c9be3513d521eb60cb307452 Mon Sep 17 00:00:00 2001 From: Derek Muensterman Date: Mon, 6 Nov 2023 11:46:25 -0500 Subject: [PATCH] Force ARM Platform Docker Build for Graviton2 Compatibility --- .github/workflows/build-docker-only.yml | 2 +- fargate.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-docker-only.yml b/.github/workflows/build-docker-only.yml index dee007d..84a480d 100644 --- a/.github/workflows/build-docker-only.yml +++ b/.github/workflows/build-docker-only.yml @@ -25,6 +25,6 @@ jobs: id: login-ecr uses: aws-actions/amazon-ecr-login@v1 - name: Build Docker Image - run: docker build -t ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/wp:latest ./docker + run: docker buildx build --platform linux/arm64/v8 -t ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/wp:latest ./docker - name: Push Docker Image run: docker push ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.AWS_REGION }}.amazonaws.com/wp:latest diff --git a/fargate.tf b/fargate.tf index 582f912..ede6847 100644 --- a/fargate.tf +++ b/fargate.tf @@ -170,7 +170,7 @@ resource "aws_ecs_task_definition" "this" { cpu_architecture = "ARM64" # Indicate Graviton2 processor architecture operating_system_family = "LINUX" } - + container_definitions = <