Several environment variables are available for you to configure the Docker Compose command-line behaviour.
Variables starting with
DOCKER_ are the same as those used to configure the Docker command-line client. If you’re using
docker-machine, then the
eval "$(docker-machine env my-docker-vm)" command should set them to their correct values. (In this example,
my-docker-vm is the name of a machine you created.)
Sets the project name. This value is prepended along with the service name to the container container on start up. For example, if you project name is
myapp and it includes two services
web then compose starts containers named
Setting this is optional. If you do not set this, the
COMPOSE_PROJECT_NAME defaults to the
basename of the project directory. See also the
-p command-line option.
Specify the file containing the compose configuration. If not provided, Compose looks for a file named
docker-compose.yml in the current directory and then each parent directory in succession until a file by that name is found. See also the
-f command-line option.
The Docker API only supports requests from clients which report a specific version. If you receive a
client and server don't have same version error using
docker-compose, you can workaround this error by setting this environment variable. Set the version value to match the server version.
Setting this variable is intended as a workaround for situations where you need to run temporarily with a mismatch between the client and server version. For example, if you can upgrade the client but need to wait to upgrade the server.
Running with this variable set and a known mismatch does prevent some Docker features from working properly. The exact features that fail would depend on the Docker client and server versions. For this reason, running with this variable set is only intended as a workaround and it is not officially supported.
If you run into problems running with this set, resolve the mismatch through upgrade and remove this setting to see if your problems resolve before notifying support.
Sets the URL of the
docker daemon. As with the Docker client, defaults to
When set to anything other than an empty string, enables TLS communication with the
Configures the path to the
key.pem files used for TLS verification. Defaults to
Configures the time (in seconds) a request to the Docker daemon is allowed to hang before Compose considers it failed. Defaults to 60 seconds.
© 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.