Created
January 15, 2017 23:00
-
-
Save cameck/9ce71ba3e447444bf7f799d92c46c171 to your computer and use it in GitHub Desktop.
Getting AWS Credentials into to a Docker Container without Hardcoding It
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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