Compose supports declaring default environment variables in an environment file named
.env placed in the folder
docker-compose command is executed from (current working directory).
Compose expects each line in an env file to be in
VAR=VAL format. Lines beginning with
# (i.e. comments) are ignored, as are blank lines.
Note: Values present in the environment at runtime will always override those defined inside the
.envfile. Similarly, values passed via command-line arguments take precedence as well.
© 2013–2016 Docker, Inc.
Licensed under the Apache License, Version 2.0.
Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries.
Docker, Inc. and other parties may also have trademark rights in other terms used herein.