Skip to content

Instantly share code, notes, and snippets.

@eugenestarchenko
Forked from cameck/start.sh
Created September 24, 2018 11:56
Show Gist options
  • Select an option

  • Save eugenestarchenko/48321c6bd35da66e967f3e75ac640f54 to your computer and use it in GitHub Desktop.

Select an option

Save eugenestarchenko/48321c6bd35da66e967f3e75ac640f54 to your computer and use it in GitHub Desktop.
Getting AWS Credentials into to a Docker Container without Hardcoding It
AWS_ACCESS_KEY_ID=$(aws --profile default configure get aws_access_key_id)
AWS_SECRET_ACCESS_KEY=$(aws --profile default configure get aws_secret_access_key)
docker build -t my_app .
docker run -it --rm \
-e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
-e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment