... defines an alpine linux container providing an env to run bash or python scripts, that need awscli, credstash, curl and / or jq.
-
credstash (for managing secrets in aws)
-
bash, curl, git, make, jq, openssh client and friends
You are encouraged to use the semver docker tags.
You can peg to the latest major, or latest major.minor version instead of a specific major.minor.patch version if you prefer.
e.g. opsgang/aws_env:1 # the latest 1.x.x opsgang/aws_env:1.2 # the latest 1.2.x
master branch built at shippable.com
git clone https://github.com/opsgang/docker_aws_env.git
cd docker_aws_env
git clone https://github.com/opsgang/alpine_build_scripts
./build.sh # adds custom labels to image
docker pull opsgang/aws_env:stable # or use the tag you prefer
# run a custom script /path/to/script.sh that uses aws cli, curl, jq blah ...
docker run --rm -i -v /path/to/script.sh:/script.sh:ro opsgang/aws_env:stable /script.sh
# make my aws creds available and run /some/python/script.py
export AWS_ACCESS_KEY_ID="i'll-never-tell" # replace glibness with your access key
export AWS_SECRET_ACCESS_KEY="that's-for-me-to-know" # amend as necessary
docker run --rm -i \ # ... run interactive to see stdout / stderr
-v /some/python/script.py:/my.py:ro \ # ... assume the file is executable
--env AWS_ACCESS_KEY_ID \ # ... will read it from your env
--env AWS_SECRET_ACCESS_KEY \ # ... will read it from your env
--env AWS_DEFAULT_REGION=eu-west-2 \ # ... adjust geography to taste
opsgang/aws_env:stable /my.py # script can access these env vars