'How to pass environment variables from YAML file OR git repo to docker container?

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!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source