Bootstrap FreeKB - Docker - Define environment variables in a container using the docker run -e or --env command
Docker - Define environment variables in a container using the docker run -e or --env command

Updated:   |  Docker articles

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

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter af4714 in the box below so that we can be sure you are a human.