An awscli docker image for k8s deployment
Set up your AWS credentials in the ~/.aws/credentials
file.
Example contents:
[default]
aws_access_key_id=AKIAIOSFODNN7EXAMPLE
aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Note:
The UID and GID in the image are set to 1000. If your UID and GID are different and you want to mount your credentials file as a volume in the container, you need to rebuild the image passing your correct values as build arguments.
Example:
docker build --tag yourname/awscli --build-arg PUID=1001 --build-arg PGID=1001 .
To run the container with your AWS credentials locally:
docker run --rm -it -v ${HOME}/.aws/credentials:/awscli/.aws/credentials:ro --name awscli andreswebs/awscli:latest
You need a working k8s cluster and kubectl
configured.
kubectl apply -f awscli.yml
kubectl attach --namespace awscli -ti awscli
Andre Silva @andreswebs
This project is licensed under the Unlicense.
Based on the dockerfiles and configurations by
https://github.com/Docker-Hub-frolvlad/docker-alpine-python3/blob/master/Dockerfile
and