sfneal / python-aws

Docker image with Python 3 and awcli installed

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sfneal/python-aws

Build Status Total Downloads Latest Version

python-aws is a python-buster based image with the AWS CLI preinstalled. Useful for silently adding AWS credentials to a Docker image without storing them in bash history.

Installation

Docker images can be pulled using the Docker CLI.

docker pull stephenneal/python-aws:3.9-buster

Usage

At the top of a Dockerfile requiring AWS authentication add this snippet & your AWS credentials to build arguments.

# Start from tiny base Python image to silently register AWS keys
FROM stephenneal/python-aws:3.9-alpine as AWS
ARG aws_access_key_id
ARG aws_secret_access_key
ARG aws_region_name
ENV aws_access_key_id=${aws_access_key_id}
ENV aws_secret_access_key=${aws_secret_access_key}
ENV aws_region_name=${aws_region_name}
RUN sh aws-credentials.sh

After building the rest of your image, copy the AWS json file from the intermediate python-aws container to your final image.

# Set AWS Environment Variables
COPY --from=aws /root/.aws /root/.aws

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email stephen.neal14@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Docker image with Python 3 and awcli installed

License:MIT License


Languages

Language:Shell 50.3%Language:Dockerfile 49.7%