Get Environment Variable from Docker Container

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 variable that has been set through some docker exec container /bin/bash session? I can do docker exec container env | grep ENV_VAR, but I would prefer something that just returns … Read more