Public Repository

Last pushed: 10 months ago
Short Description
Docker image "sgupt1/awscli-docker" can perform AWS CLI in a container to void local download.
Full Description

How to run a AWS CLI on a container:

To run the docker container using this image, use the below by passing the access information (AWS access key ID and secret key) as:

docker run \
--env AWS_ACCESS_KEY_ID=<<YOUR_ACCESS_KEY>> \
--env AWS_SECRET_ACCESS_KEY=<<YOUR_SECRET_ACCESS>> \
--env AWS_DEFAULT_REGION=us-east-1 \
docker pull sgupta1/awscli-docker \
<aws command here>

eg:

docker run \
--env AWS_ACCESS_KEY_ID=<<YOUR_ACCESS_KEY>> \
--env AWS_SECRET_ACCESS_KEY=<<YOUR_SECRET_ACCESS>> \
--env AWS_DEFAULT_REGION=us-east-1 \
docker pull sgupta1/awscli-docker \
ecr get-login --region us-east-1

============

If you need to spin-up AWS CLI container multiple times, it's better to create an alias to use as:

alias aws=docker run \
--env AWS_ACCESS_KEY_ID=<<YOUR_ACCESS_KEY>> \
--env AWS_SECRET_ACCESS_KEY=<<YOUR_SECRET_ACCESS>> \
--env AWS_DEFAULT_REGION=us-east-1 \
docker pull sgupta1/awscli-docker \

and then just run aws commands in same manner as you have AWS CLI installed locally

aws ecr get-login --region us-east-1

=========

EntryPoint is "aws"

Docker Pull Command
Owner
sgupta1

Comments (0)