Skip to content

Instantly share code, notes, and snippets.

@cedricvidal
Created January 23, 2025 01:40
Show Gist options
  • Save cedricvidal/69e2dbfbe37bd718b9917578875c3a62 to your computer and use it in GitHub Desktop.
Save cedricvidal/69e2dbfbe37bd718b9917578875c3a62 to your computer and use it in GitHub Desktop.
Source .env variables and execute command or docker image
# 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