- Newest
- Most votes
- Most comments
I found out what the problem was and thought I would document it here to help others that might be in the same boat. See, when we originally developed this process I was using an Intel MacBook Pro and everything worked fine.
However, as I noted in the question, my current machine is an M1 (ARM) system. So, when I built the Docker images locally and uploaded them to ECR, it caused CodeBuild to fail with that "SINGLE_BUILD_CONTAINER_DEAD" error. I solved my "problem" by having CodeBuild create the Docker image for me and uploading that to ECR.
NOTE: I'm sure that it's possible to get Docker on an M1 machine to create x86 images, but I'm not familiar enough with Docker to make that happen. If you know the magic incantations to make that happen, please let a comment below.
I too faced this problem. I was able to solve it by using docker buildx. I think the reason is that Apple silicon chips use arm architecture and the docker build process includes binaries and dependencies in the image that depend on the architecture of the host machine. So, you can solve this problem by building the image with the amd architecture.
Relevant content
- Accepted Answerasked 2 years ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago