Created
January 23, 2025 01:40
-
-
Save cedricvidal/69e2dbfbe37bd718b9917578875c3a62 to your computer and use it in GitHub Desktop.
Source .env variables and execute command or docker image
This file contains hidden or 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
# print env vars | |
cat .azure/test/.env | xargs -i echo {} | |
# use for a command and merge into current env | |
env $(cat .azure/test/.env | xargs) env | |
# use as a docker run --env-file | |
docker run -it --env-file <(cat .azure/test/.env | xargs -i echo {}) ubuntu env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment