Created
June 1, 2022 23:45
-
-
Save ChrisSwanson/62cdc4b6eaab5cb3821124c89b91a954 to your computer and use it in GitHub Desktop.
.env to Docker ENV oneliner
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
#!/usr/bin/bash | |
cat .env | awk -F"\=" '{ print $1 }' | grep -v -e '^$' | while read line; do echo "ENV $line=\"\""; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment