logo image

How to pass environment variables to docker?


1 Answer

10 months ago by

You can pass environment variables using -e option to the docker run command. For example you want to pass PORT to your docker container then you can do as following

docker run -e PORT=8080 foo/bar:latest	
10 months ago by Megamind