I’m having a .env
file that contains variables
VALUE_A=10
NAME=SWARNA
I’m having an env.yml
file.
Information:
value: $VALUE_A
name: $NAME
I’m having a python file envpy.py
from envyaml import EnvYAML
# read file env.yml and parse config
env = EnvYAML('env.yml')
print(env['Information']['value'])
print(env['Information']['name'])
Here is my Dockerfile
FROM python:3
ADD envpy.py /
ADD env.yml /
RUN pip install envyaml
CMD [ "python", "./envpy.py" ]
Expected output
:
10
SWARNA
But I got :
VALUE_A
NAME
How to print the values. Please correct me or suggest me where I’m doing wrong. Thank you.