Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save LoicMahieu/f9b5f0109ed1d8defa89ff067c86da4c to your computer and use it in GitHub Desktop.
Save LoicMahieu/f9b5f0109ed1d8defa89ff067c86da4c to your computer and use it in GitHub Desktop.
Docker run with AWS env keys
docker run --rm -it \
-e AWS_ACCESS_KEY_ID=$(cat ~/.aws/credentials | grep aws_access_key_id | awk '{ split($0,a,"="); print a[2] }') \
-e AWS_SECRET_ACCESS_KEY=$(cat ~/.aws/credentials | grep aws_secret_access_key | awk '{ split($0,a,"="); print a[2] }') \
node:10 \
bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment