If I pass an environment variable which is set inside of the container as an argument to docker run, my shell evaluates it. For example:
I want my container to print the value of $FOO which is bar. None of these will work:
# Prints blank line
$ docker run -e FOO=bar ubuntu echo $FOO
# Prints '$FOO'
$ docker run -r FOO=bar ubuntu echo \$FOO