My current setup for running a docker container is on the lines of this:
main.env
# Main export PRIVATE_IP=\\`echo
example: test=123 val=Guru
docker run -it --env-file=.env bash
echo $test (should print 123)