Im looking for an elegant way to import env variables to container from a file, trying to avoid hardcoding them in Dockerfile.
#my_file.txt
VAR1=123
VAR2=345
...
I know that this is possible with:
docker run --env-file my_file.txt some_ubuntu_image
but I'm looking for a way to declare this in Dockerfile rather than in run command. Something like:
RUN export -r my_file.txt
or
ENV -r my_file.txt
this ofc does not work, but I hope it gives some image what Im looking for.