This assumes you have installed Docker on Linux and Docker is running.
The -e or --env option can be used to define environment variables. In this example, when using the docker run command to create snd start the Hello world container, the "foo" variable contains a value of "bar". This assumes that the Hello world service is configured to use the foo variable.
docker run --env foo=bar hello-world