Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker image to fix aws-cli, update doctor to properly report AWS info from within docker. #65

Merged
merged 3 commits into from
Oct 12, 2022

Conversation

avrittrohwer
Copy link
Contributor

@avrittrohwer avrittrohwer commented Oct 12, 2022

Docker image changes

The aws cli executable dynamically links against shared objects that are not included in alpine linux (build with musl instead of glibc). Update the docker image to build from non-alpine varients.

Alternatives considered:

  1. Adding gcompat to the apk add list. This did not resolve the issue because aws-cli still linked against
    missing shared objects.
  2. Add missing shared objects manually like in
    [v2] Distribute binaries for alpine / musl libc aws/aws-cli#4685 (comment).
    This approached seems very brittle so I opted to use non-alpine
    images instead.

Resolves civiform/civiform#3508 (comment).

Doctor changes

  1. aws help requires groff, switch the command to aws --version.
  2. aws configure list-profiles does not work when only setting the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY env variables. Update check to call aws sts get-caller-identity instead.

Addresses some aspects of civiform/civiform#3544.

aws-cli expects glibc shared objects which are not present on alpine.

Alternatives considered:

1. Adding gcompat to the apk add list.  The aws-cli still linked against
   missing shared objects.
1. Add missing shared objects manually like in
   aws/aws-cli#4685 (comment).
   This approached seems very brittle so I opted to use non-alpine
   images instead.
@avrittrohwer avrittrohwer merged commit c0a2b7b into main Oct 12, 2022
@avrittrohwer avrittrohwer deleted the avritt/fix-docker-mode branch October 12, 2022 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use docker-based cli for AWS
2 participants