dockerfiles/awscli/Dockerfile

28 lines
579 B
Docker
Raw Permalink Normal View History

# Run awscli in a container and list s3 buckets
#
# docker run --rm -it \
# --name awscli \
# jess/awscli \
# s3 ls
#
FROM alpine:latest
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
2014-10-09 19:38:11 +02:00
RUN apk --no-cache add \
ca-certificates \
groff \
2015-10-01 01:47:19 +02:00
less \
python3 \
&& pip3 install awscli \
&& mkdir -p /root/.aws \
&& { \
echo '[default]'; \
echo 'output = json'; \
echo 'region = $AWS_DEFAULT_REGION'; \
echo 'aws_access_key_id = $AMAZON_ACCESS_KEY_ID'; \
echo 'aws_secret_access_key = $AMAZON_SECRET_ACCESS_KEY'; \
} > /root/.aws/config
2014-10-09 20:39:37 +02:00
2014-10-09 19:38:11 +02:00
ENTRYPOINT [ "aws" ]