ARM64 image has binaries for x86-64 in it
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 , 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
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.
Agreed. Sorry about that. Reopened.
@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.
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
ecs-cli for ARM is supported in aarch64-standard:3.0.