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

Feature/#9 #10

Closed
wants to merge 4 commits into from
Closed

Feature/#9 #10

wants to merge 4 commits into from

Conversation

ozbillwang
Copy link
Collaborator

@ozbillwang ozbillwang commented Feb 1, 2021

  • install both aws cli v1 and v2 in same image
  • set ENTRYPOINT to switch default aws cli version when run the container.
  • if environment variable awscli is set to v2, default aws cli version is v2
  • if environment variable awscli is set to v1, not set or set to anything else, except v2, aws cli will be run from /usr/bin, and version is v1
  • you can still run specific version with full path in container.
    aws cli v1 - installed at /usr/bin, run as /usr/bin/aws
    aws cli v2 - installed at /usr/local/bin, run as /usr/local/bin/aws
  • close Add AWS CLI v2 #9
  • since aws cli v2 need glibc, image size increased for about 200MB.

Run a manual test:

$ docker build -t k8s .
$ docker run -ti --rm -e awscli=v2 k8s aws --version
aws-cli/2.1.22 Python/3.7.3 Linux/4.19.121-linuxkit exe/x86_64.alpine.3 prompt/off
$ docker run -ti --rm -e awscli=v1 k8s aws --version
aws-cli/1.18.223 Python/3.8.7 Linux/4.19.121-linuxkit botocore/1.19.63
$ docker run -ti --rm k8s --version
aws-cli/1.18.223 Python/3.8.7 Linux/4.19.121-linuxkit botocore/1.19.63

@ozbillwang ozbillwang closed this May 16, 2021
@ozbillwang ozbillwang mentioned this pull request Apr 8, 2022
@ozbillwang ozbillwang deleted the feature/#9 branch August 3, 2023 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add AWS CLI v2
1 participant