copilot-cli: Pipeline failed on build stage when adding linux/arm64 to manifest.yml

I set up pipeline. At first with build.image: aws/codebuild/amazonlinux2-aarch64-standard:2.0 on pipeline.yml but copilot is failing to create the pipeline so I removed it. Then the pipeline was created successfully. But when I added platform: linux/arm64 to manifest.yml, the build stage failed.

My build stops when on this stage of Dockerfile

Step 4/15 : RUN apk add git openssh-client
--
2087 | ---> [Warning] The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested
2088 | ---> Running in 82ae210f5727
2089 | standard_init_linux.go:228: exec user process caused: exec format error
2090 | The command '/bin/sh -c apk add git openssh-client' returned a non-zero code: 1

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (11 by maintainers)

Commits related to this issue

Most upvoted comments

886 | /codebuild/output/tmp/script.sh: line 5: ./copilot-linux: cannot execute binary file

It seems like ./copilot-linux is not compatible to the environment. Did you set up the build image to be ARM? If so then could you update the buildspec so as to make sure it is using the copilot for the right platform?

- wget https://ecs-cli-v2-release.s3.amazonaws.com/copilot-linux-arm64-v1.14.0

Submitted PR with partial solution to support pipeline builds for ARM #3190