Docker: set ENV variable using RUN command?

I am writing a Dockerfile to customize my customized WordPress environment. I start with ubuntu: the latter and would like to add some repositories dynamically by setting the ENV variable to the code name of the current version of Ubuntu. How can I do this, or is there a better way to achieve this?

+4
source share
1 answer

Start your container as follows: docker run -e VAR=value -e ANOTHER_VAR=another_value .... VAR and ANOTHER_VAR will be available in the container environment.

+6
source

All Articles