What\'s the simplest way to get an environment variable from a docker container that has not been declared in the Dockerfile?
For instance, an environment v
You can use printenv VARIABLE instead of /bin/bash -c 'echo $VARIABLE. It's much simpler and it does not perform substitution:
printenv VARIABLE
/bin/bash -c 'echo $VARIABLE
docker exec container printenv VARIABLE