How to pass environment variables to docker?

Views: 188 Ask New Question


On By

1 Answer


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
On By


Answer This Question