Miminal AWS CLI Container
This repository is used to build a small Alpine Linux-based container with Amazon Web Services command line tool.
mkdir ~/.aws
docker run -it --rm -v ~/.aws:/home/aws/.aws -v ~/.ecs:/home/aws/.ecs agilebitsinc/awscli
aws configure
The easiest way is to create an alias:
alias aws='docker run -it --rm -v ~/.aws:/home/aws/.aws -v ~/.ecs:/home/aws/.ecs -v $PWD:/data agilebitsinc/awscli'
After that, use aws
to run multiple commands within the container or `aws to run an individual command, for example:
aws ec2 describe-regions
export AWSCLI_VERSION=1.11.76
docker build -t agilebitsinc/awscli:$AWSCLI_VERSION .
docker push agilebitsinc/awscli:$AWSCLI_VERSION
docker build -t agilebitsinc/awscli:latest .
docker push agilebitsinc/awscli:latest