Skip to content

Instantly share code, notes, and snippets.

@dantheman213
Created July 17, 2018 03:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dantheman213/3583196bd9f1eb325f62d2f32c1c8ce2 to your computer and use it in GitHub Desktop.
Save dantheman213/3583196bd9f1eb325f62d2f32c1c8ce2 to your computer and use it in GitHub Desktop.
Read every line of an environment variable file for Docker in as a standard bash script.
while read fileLine; do echo "Exporting ${fileLine}...\n"; export ${fileLine}; done < secrets.env
// EX: secrets.env
// MY_VAR=123
// MY_API_KEY=ASDFKJDSFJL234545
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment