aws-codebuild-docker-images icon indicating copy to clipboard operation
aws-codebuild-docker-images copied to clipboard

ARM64 image has binaries for x86-64 in it

Open otterley opened this issue 5 years ago • 5 comments

Our ARM64 image has binaries built for the x86-64 architecture in it, including ecs-cli, leading to the following error when you try to run it:

/usr/local/bin/ecs-cli: cannot execute binary file

otterley avatar Jun 16 '20 01:06 otterley

@otterley , we have fixed this issue in the latest ARM 1.0 and 2.0 standard images.
(1) https://github.com/aws/aws-codebuild-docker-images/blob/master/al2/aarch64/standard/1.0/Dockerfile#L121 (2) https://github.com/aws/aws-codebuild-docker-images/blob/master/al2/aarch64/standard/2.0/Dockerfile#L80

awszhen avatar Jun 20 '20 03:06 awszhen

Hi @awszhen - thanks for the update! However, the update did not completely address the issue because it removed ecs-cli instead of replacing it with an arm64 build. Therefore it is not completely accurate to conclude that this issue has been fully addressed.

otterley avatar Jun 20 '20 16:06 otterley

Agreed. Sorry about that. Reopened.

subinataws avatar Jun 20 '20 17:06 subinataws

@otterley , thanks for the reminder. We will pick up the ecs-cli for our ARM image when it is available in https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_CLI_installation.html.

awszhen avatar Jun 20 '20 20:06 awszhen

While the target distro for this issue appears to be AL2, there are Ubuntu18.04 ARM Ec2 instances available. When trying to docker build Ubuntu on aarch64, the Firefox install fails with a similar issue:

Processing triggers for libc-bin (2.27-3ubuntu1.2) ...
+ wget -nv -O /root/FirefoxSetup.tar.bz2 https://download.mozilla.org/?product=firefox-latest&os=linux64
2020-09-22 17:39:26 URL:https://download-installer.cdn.mozilla.net/pub/firefox/releases/81.0/linux-x86_64/en-US/firefox-81.0.tar.bz2 [72274470/72274470] -> "/root/FirefoxSetup.tar.bz2" [1]
+ tar xjf /root/FirefoxSetup.tar.bz2 -C /opt/
+ ln -s /opt/firefox/firefox /usr/local/bin/firefox
+ rm /root/FirefoxSetup.tar.bz2
+ firefox --version
/bin/sh: 1: firefox: Exec format error

dougch avatar Sep 22 '20 17:09 dougch

ecs-cli for ARM is supported in aarch64-standard:3.0.

Dylan-AWS avatar Dec 04 '23 22:12 Dylan-AWS