Home > Back-end >  How to pass environment variables from YAML file OR git repo to docker container?
How to pass environment variables from YAML file OR git repo to docker container?

Time:02-27

is it possible to pass environment variables from a YAML file OR git repo to docker container? I have a YAML file which contains my environment VARs that i want to use inside the docker container in a python script. How can i do this?

Many thanks!

CodePudding user response:

You can pass environment variables from your shell straight through to a service container just like with: "docker run -e variable"

You can pass multiple environment variables from a file to a service container just like with: "docker run --env-file"

  • Related