fix(aws): Fix AWS CLI v2 for Alpine Linux #6279
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The version of the AWS CLI v2 that is currently installed in the
slim
docker images (Alpine based) does not work. Trying to execute the aws binary results in abash: /usr/local/bin/aws: No such file or directory
error, even though the binary is present. The error occurs because Alpine Linux doesn't supportglibc
. To fix this we need to install a version of AWS CLI v2 that is usingmusl
instead ofglibc
.Starting from Alpine 3.18, compatible aws-cli binaries are available in the official package repos, meaning we can just
apt add
it.I've bumped the version to the latest available for Alpine (2.15.57) and also bumped Alpine itself from 3.16 to 3.20 (since aws-cli v2 wasn't available in 3.16, and only 3.20 supports the newest version of aws-cli).