awscli packaged in a lightweight docker container
7.6K
aws cli packaged in docker
using the alpine linux docker image
this is an extremely lightweight image containing:
total image size is approx 116mb
to run a specific tagged version of the awscli, specify the version in the docker tag, e.g.
snapkitchen/awscli:${VERSION}
to pass credentials, either:
provide them as environment variables with the docker run command, e.g.:
docker run --rm \
-e "AWS_ACCESS_KEY_ID=MYACCESSKEY" \
-e "AWS_SECRET_ACCESS_KEY=MYSECRETKEY" \
-e "AWS_DEFAULT_REGION=us-east-1" \
snapkitchen/awscli:${VERSION} \
s3 ls s3://example-bucket
OR
mount your .aws folder to the /root/.aws folder inside the container, e.g.:
docker run --rm \
-v "${HOME}/.aws:/root/.aws" \
snapkitchen/awscli:${VERSION} \
s3 ls s3://example-bucket
entrypoint is aws, so arguments can be specified directly, e.g.:
docker run --rm snapkitchen/awscli:${VERSION} --version
example aws s3 ls using docker run
docker run --rm snapkitchen/awscli:${VERSION} s3 ls s3://example-bucket
builds are automatically handled by docker hub
to build and release an image for awscli, add the relevant version to the list in awscli-versions
Content type
Image
Digest
Size
29.5 MB
Last updated
about 7 years ago
docker pull snapkitchen/awscli:1.16.157