Breaking Changes
-
docker-compose logsno longer follows log output by default. It now matches the behaviour ofdocker logsand exits after the current logs are printed. Use-fto get the old default behaviour. -
Booleans are no longer allows as keys for mappings in the Compose file (for keys
environment,labelsandextra_hosts). Previously this was a warning. Boolean values should be quoted so they become string values.
New Features
-
Compose now looks for a
.envfile in the directory where it's run and reads any environment variables defined inside, if they're not already set in the shell environment. This lets you easily set defaults for variables used in the Compose file, or for any of theCOMPOSE_*orDOCKER_*variables. -
Added a
--remove-orphansflag to bothdocker-compose upanddocker-compose downto remove containers for services that were removed from the Compose file. -
Added a
--allflag todocker-compose rmto include containers created bydocker-compose run. This will become the default behavior in the next version of Compose. -
Added support for all the same TLS configuration flags used by the
dockerclient:--tls,--tlscert,--tlskey, etc. -
Compose files now support the
tmpfsandshm_sizeoptions. -
Added the
--workdirflag todocker-compose run -
docker-compose logsnow shows logs for new containers that are created after it starts. -
The
COMPOSE_FILEenvironment variable can now contain multiple files, separated by the host system's standard path separator (:on Mac/Linux,;on Windows). -
You can now specify a static IP address when connecting a service to a network with the
ipv4_addressandipv6_addressoptions. -
Added
--follow,--timestamp, and--tailflags to thedocker-compose logscommand. -
docker-compose up, anddocker-compose startwill now start containers in parallel where possible. -
docker-compose stopnow stops containers in reverse dependency order instead of all at once. -
Added the
--buildflag todocker-compose upto force it to build a new image. It now shows a warning if an image is automatically built when the flag is not used. -
Added the
docker-compose execcommand for executing a process in a running container.
Bug Fixes
-
docker-compose downnow removes containers created bydocker-compose run. -
A more appropriate error is shown when a timeout is hit during
upwhen using a tty. -
Fixed a bug in
docker-compose downwhere it would abort if some resources had already been removed. -
Fixed a bug where changes to network aliases would not trigger a service to be recreated.
-
Fix a bug where a log message was printed about creating a new volume when it already existed.
-
Fixed a bug where interrupting
upwould not always shut down containers. -
Fixed a bug where
log_optandlog_driverwere not properly carried over when extending services in the v1 Compose file format. -
Fixed a bug where empty values for build args would cause file validation to fail.