How to set environment variables in Command Prompt so they're passed in `docker run -e FOO -e ...`

Okay, I think I see what you want now.

You really don’t need to export the variable first with export FOO=bar or set FOO=bar ,
you can set them directly in the docker run command like this
docker run -e Foo=bar ubuntu env