1.12.0
If you're a Mac or Windows user, the best way to install Compose and keep it up-to-date is Docker for Mac and Windows.
Docker for Mac and Windows will automatically install the latest version of Docker Engine for you.
Alternatively, you can use the usual commands to install or upgrade Compose:
curl -L https://github.com/docker/compose/releases/download/1.12.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
See the install docs for more install options and instructions.
Compose file format compatibility matrix
Compose file format | Docker Engine |
---|---|
3.0 – 3.2 | 1.13.0+ |
2.1 | 1.12.0+ |
2.0 | 1.10.0+ |
1.0 | 1.9.1+ |
Changes
New features
Compose file version 3.2
-
Introduced version 3.2 of the
docker-compose.yml
specification. -
Added support for
cache_from
in thebuild
section of services -
Added support for the new expanded ports syntax in service definitions
-
Added support for the new expanded volumes syntax in service definitions
Compose file version 2.1
- Added support for
pids_limit
in service definitions
Compose file version 2.0 and up
-
Added
--volumes
option todocker-compose config
that lists named
volumes declared for that project -
Added support for
mem_reservation
in service definitions (2.x only) -
Added support for
dns_opt
in service definitions (2.x only)
All formats
-
Added a new
docker-compose images
command that lists images used by
the current project's containers -
Added a
--stop
(shorthand-s
) option todocker-compose rm
that stops
the running containers before removing them -
Added a
--resolve-image-digests
option todocker-compose config
that
pins the image version for each service to a permanent digest -
Added a
--exit-code-from SERVICE
option todocker-compose up
. When
used,docker-compose
will exit on any container's exit with the code
corresponding to the specified service's exit code -
Added a
--parallel
option todocker-compose pull
that enables images
for multiple services to be pulled simultaneously -
Added a
--build-arg
option todocker-compose build
-
Added a
--volume <volume_mapping>
(shorthand-v
) option to
docker-compose run
to declare runtime volumes to be mounted -
Added a
--project-directory PATH
option todocker-compose
that will
affect path resolution for the project -
When using
--abort-on-container-exit
indocker-compose up
, the exit
code for the container that caused the abort will be the exit code of
thedocker-compose up
command -
Users can now configure which path separator character they want to use
to separate theCOMPOSE_FILE
environment value using the
COMPOSE_PATH_SEPARATOR
environment variable -
Added support for port range to single port in port mappings
(e.g.8000-8010:80
)
Bugfixes
-
docker-compose run --rm
now removes anonymous volumes after execution,
matching the behavior ofdocker run --rm
. -
Fixed a bug where override files containing port lists would cause a
TypeError to be raised -
Fixed a bug where scaling services up or down would sometimes re-use
obsolete containers -
Fixed a bug where the output of
docker-compose config
would be invalid
if the project declared anonymous volumes -
Variable interpolation now properly occurs in the
secrets
section of
the Compose file -
The
secrets
section now properly appears in the output of
docker-compose config
-
Fixed a bug where changes to some networks properties would not be
detected against previously created networks -
Fixed a bug where
docker-compose
would crash when trying to write into
a closed pipe -
Fixed an issue where Compose would not pick up on the value of
COMPOSE_TLS_VERSION
when used in combination with command-line TLS flags
Thanks to @albers, @edsrzf, @kinghuang, @sdurrheimer, @null, @dnephin, @xulike666, @jyapayne, @tcc-jenkins, @JesusTinoco, @jcberthon, @fate-grand-order, @vehsamrak, @rawkode, @pts-kevinqiu, @nkovacs, @nbarbey, @milin, @melkor217, @marcosnils, @lindt, @Knetic, @kevinetc123, @hholst80, @eddwardo, @dguo, @dbonev, @dattran-vn01, @bheesham and @allandequeiroz for contributing to this release!