docker how to echo env variable in bash

Shell
docker exec <container-name> env
Source

Also in Shell: