My current setup for running a docker container is on the lines of this:
main.env
# Main export PRIVATE_IP=\\`echo
creating an ENV file that is nothing more than key/value pairs can be processed in normal shell commands and appended to the environment. Look at the bash -a pragma.