Releases: docker/compose
1.6.0 RC1
Note that Compose 1.6.0 requires Docker 1.9.0 or later.
If you're a Mac user, the Docker Toolbox will install Compose 1.6.0 for you, alongside the latest versions of the Docker Engine, Machine and Kitematic.
You can use the usual commands to install or upgrade:
curl -L https://github.com/docker/compose/releases/download/1.6.0-rc1/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.
Major Features:
- Compose 1.6 introduces a new format for
docker-compose.yml
which lets
you define networks and volumes in the Compose file as well as services. It
also makes a few changes to the structure of some configuration options.
You don't have to use it - your existing Compose files will run on Compose
1.6 exactly as they do today.
See the Compose file reference for more information:
https://github.com/docker/compose/blob/1.6.0-rc1/docs/compose-file.md
- Support for networking has exited experimental status and is the recommended
way to enable communication between containers.
If you use the new file format, your app will use networking. If you want to
keep using links, just leave your Compose file as it is and it'll continue
to work just the same.
By default, you don't have to configure any networks. In fact, using
networking with Compose involves even less configuration than using links.
Consult the networking guide for how to use it:
https://github.com/docker/compose/blob/1.6.0-rc1/docs/networking.md
The experimental flags --x-networking
and --x-network-driver
, introduced
in Compose 1.5, have been removed.
- You can now pass arguments to a build if you're using the new file format:
build:
context: .
args:
buildno: 1
- You can now specify both a
build
and animage
key if you're using the
new file format.docker-compose build
will build the image and tag it with
the name you've specified, whiledocker-compose pull
will attempt to pull
it. - There's a new
events
command for monitoring container events from
the application, much likedocker events
. This is a good primitive for
building tools on top of Compose for performing actions when particular
things happen, such as containers starting and stopping.
New Features:
- Added a new command
config
which validates and prints the Compose
configuration after interpolating variables, resolving relative paths, and
merging multiple files andextends
. - Added a new command
create
for creating containers without starting them. - Added a new command
down
to stop and remove all the resources created by
up
in a single command. - Added support for the
cpu_quota
configuration option. - Added support for the
stop_signal
configuration option. - Commands
start
,restart
,pause
, andunpause
now exit with an
error status code if no containers were modified. - Added a new
--abort-on-container-exit
flag toup
which causesup
to
stop all container and exit once the first container exits. - Removed support for
FIG_FILE
,FIG_PROJECT_NAME
, and no longer reads
fig.yml
as a default Compose file location. - Removed the
migrate-to-labels
command. - Removed the
--allow-insecure-ssl
flag.
Bug Fixes:
- Fixed a validation bug that prevented the use of a range of ports in
theexpose
field. - Fixed a validation bug that prevented the use of arrays in the
entrypoint
field if they contained duplicate entries. - Fixed a bug that caused
ulimits
to be ignored when used withextends
. - Fixed a bug that prevented ipv6 addresses in
extra_hosts
. - Fixed a bug that caused
extends
to be ignored when included from
multiple Compose files. - Fixed an incorrect warning when a container volume was defined in
the Compose file. - Fixed a bug that prevented the force shutdown behaviour of
up
and
logs
. - Fixed a bug that caused
None
to be printed as the network driver name
when the default network driver was used. - Fixed a bug where using the string form of
dns
ordns_search
would
cause an error. - Fixed a bug where a container would be reported as "Up" when it was
in the restarting state.
Thanks @aanand, @shin-, @dbonev, @albers, @vdemeester, @thaJeztah, @SvenDowideit, @seguins, @sdurrheimer, @moxiegirl, @TomasTomecek, @solarce, @simonvanderveldt, @scipetr, @punkstar, @jonaseck2, @jake-low, @hourliert, @gutweiler, @garrettheel
1.5.2
Note that Compose 1.5.2 requires Docker 1.7.1 or later.
If you're a Mac user, the Docker Toolbox will install Compose 1.5.2 for you, alongside the latest versions of the Docker Engine, Machine and Kitematic.
You can use the usual commands to install or upgrade:
curl -L https://github.com/docker/compose/releases/download/1.5.2/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.
Here's what's new:
- Fixed a bug which broke the use of
environment
andenv_file
with
extends
, and caused environment keys without values to have aNone
value, instead of a value from the host environment. - Fixed a regression in 1.5.1 that caused a warning about volumes to be
raised incorrectly when containers were recreated. - Fixed a bug which prevented building a
Dockerfile
that usedADD <url>
- Fixed a bug with
docker-compose restart
which prevented it from
starting stopped containers. - Fixed handling of SIGTERM and SIGINT to properly stop containers
- Add support for using a url as the value of
build
- Improved the validation of the
expose
option
Thanks @mnowster, @aanand, @viranch, @StefanScherer, @seguins, @simonvanderveldt, @jonaseck2
1.5.1
Note that Compose 1.5.1 requires Docker 1.7.1 or later.
If you're a Mac user, the Docker Toolbox will install Compose 1.5.1 for you, alongside the latest versions of the Docker Engine, Machine and Kitematic.
You can use the usual commands to install or upgrade:
curl -L https://github.com/docker/compose/releases/download/1.5.1/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.
Here's what's new:
- Add the
--force-rm
option tobuild
. - Add the
ulimit
option for services in the Compose file. - Fixed a bug where
up
would error with "service needs to be built" if
a service changed from usingimage
to usingbuild
. - Fixed a bug that would cause incorrect output of parallel operations
on some terminals. - Fixed a bug that prevented a container from being recreated when the
mode of avolumes_from
was changed. - Fixed a regression in 1.5.0 where non-utf-8 unicode characters would cause
up
orlogs
to crash. - Fixed a regression in 1.5.0 where Compose would use a success exit status
code when a command fails due to an HTTP timeout communicating with the
docker daemon. - Fixed a regression in 1.5.0 where
name
was being accepted as a valid
service option which would override the actual name of the service. - When using
--x-networking
Compose no longer sets the hostname to the
container name. - When using
--x-networking
Compose will only create the default network
if at least one container is using the network. - When printing logs during
up
orlogs
, flush the output buffer after
each line to prevent buffering issues from hiding logs. - Recreate a container if one of it's dependencies is being created.
Previously a container was only recreated if it's dependencies already
existed, but were being recreated as well. - Add a warning when a
volume
in the Compose file is being ignored
and masked by a container volume from a previous container. - Improve the output of
pull
when run without a tty. - When using multiple Compose files, validate each before attempting to merge
them together. Previously invalid files would result in not helpful errors. - Allow dashes in keys in the
environment
service option. - Improve validation error messages by including the filename as part of the
error message.
Thanks @shin-, @mnowster, @aanand, @KevinGreene, @adrian-budau, @yvespp
1.5.0
This release contains breaking changes.
Note that Compose 1.5.0 requires Docker 1.7.1 or later.
If you're a Mac or Windows user, the Docker Toolbox will install Compose 1.5.0 for you, alongside the latest versions of the Docker Engine, Machine and Kitematic.
Otherwise, you can use the usual commands to install/upgrade. Either download the binary:
curl -L https://github.com/docker/compose/releases/download/1.5.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Or pip install -U docker-compose==1.5.0
if you prefer pip.
Here's what's new:
Breaking changes:
With the introduction of variable substitution support in the Compose file, any Compose file that uses an environment variable ($VAR
or ${VAR}
) in the command:
or entrypoint:
field will break.
Previously these values were interpolated inside the container, with a value from the container environment. In Compose 1.5.0, the values will be interpolated on the host, with a value from the host environment.
To migrate a Compose file to 1.5.0, escape the variables with an extra $
(ex: $$VAR
or $${VAR}
). See
https://github.com/docker/compose/blob/8cc8e61/docs/compose-file.md#variable-substitution
Major features:
- Compose is now available for Windows.
- Environment variables can be used in the Compose file. See
https://github.com/docker/compose/blob/129092b7/docs/yml.md#variable-substitution - Multiple compose files can be specified, allowing you to override settings in the default Compose file. See https://github.com/docker/compose/blob/129092b7/docs/reference/docker-compose.md for more details.
- Compose now produces better error messages when a file contains invalid configuration.
up
now waits for all services to exit before shutting down, rather than shutting down as soon as one container exits.- Experimental support for the new docker networking system can be enabled with the
--x-networking
flag. Read more here: https://github.com/docker/docker/blob/8fee1c20/docs/userguide/dockernetworks.md
New features:
- You can now optionally pass a mode to
volumes_from
, e.g.volumes_from: ["servicename:ro"]
. - Since Docker now lets you create volumes with names, you can refer to those volumes by name in
docker-compose.yml
. For example,volumes: ["mydatavolume:/data"]
will mount the volume namedmydatavolume
at the path/data
inside the container.
If the first component of an entry in volumes
starts with a .
, /
or ~
, it is treated as a path and expansion of relative paths is performed as necessary. Otherwise, it is treated as a volume name and passed straight through to Docker.
Read more on named volumes and volume drivers here:
https://github.com/docker/docker/blob/244d9c33/docs/userguide/dockervolumes.md
docker-compose build --pull
instructs Compose to pull the base image for each Dockerfile before building.docker-compose pull --ignore-pull-failures
instructs Compose to continue if it fails to pull a single service's image, rather than aborting.- You can now specify an IPC namespace in
docker-compose.yml
with theipc
option. - Containers created by
docker-compose run
can now be named with the--name
flag. - If you install Compose with pip or use it as a library, it now works with Python 3.
image
now supports image digests (in addition to ids and tags), e.g.
image: "busybox@sha256:38a203e1986cf79639cfb9b2e1d6e773de84002feea2d4eb006b52004ee8502d"
ports
now supports ranges of ports, e.g.
ports:
- "3000-3005"
- "9000-9001:8000-8001"
docker-compose run
now supports a-p|--publish
parameter, much likedocker run -p
, for publishing specific ports to the host.docker-compose pause
anddocker-compose unpause
have been implemented, analogous todocker pause
anddocker unpause
.- When using
extends
to copy configuration from another service in the same Compose file, you can omit thefile
option. - Compose can be installed and run as a Docker image. This is an experimental feature.
Bug fixes:
- All values for the
log_driver
option which are supported by the Docker daemon are now supported by Compose. docker-compose build
can now be run successfully against a Swarm cluster.
Thanks @mnowster, @aanand, @moxiegirl, @albers, @mrfuxi, @viranch, @sdurrheimer, @charleswhchan, @ZJaffee, @villlem, @vdemeester, @TomasTomecek, @timbutler, @ticosax, @SvenDowideit, @stedur, @ronen, @md2perpe, @ggtools, @geron, @cweagans and @au-phiware!
1.5.0 RC3
This is a release candidate for version 1.5.0 of Compose.
Note that Compose 1.5.0 requires Docker 1.8.0 or later.
To try it out, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.5.0rc3/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Or pip install -U docker-compose==1.5.0rc3
if you prefer pip.
This release contains breaking changes.
Here's what's new:
Breaking changes:
With the introduction of variable substitution support in the Compose file, any
Compose file that uses an environment variable ($VAR
or ${VAR}
) in the command:
or entrypoint:
field will break.
Previously these values were interpolated inside the container, with a value
from the container environment. In Compose 1.5.0, the values will be
interpolated on the host, with a value from the host environment.
To migrate a Compose file to 1.5.0, escape the variables with an extra $
(ex: $$VAR
or $${VAR}
). See
https://github.com/docker/compose/blob/8cc8e61/docs/compose-file.md#variable-substitution
Major features:
- Compose is now available for Windows.
- Environment variables can be used in the Compose file. See
https://github.com/docker/compose/blob/129092b7/docs/yml.md#variable-substitution - Multiple compose files can be specified, allowing you to override
settings in the default Compose file. See
https://github.com/docker/compose/blob/129092b7/docs/reference/docker-compose.md
for more details. - Compose now produces better error messages when a file contains
invalid configuration. up
now waits for all services to exit before shutting down,
rather than shutting down as soon as one container exits.- Experimental support for the new docker networking system can be
enabled with the--x-networking
flag. Read more here:
https://github.com/docker/docker/blob/8fee1c20/docs/userguide/dockernetworks.md
New features:
- You can now optionally pass a mode to
volumes_from
, e.g.
volumes_from: ["servicename:ro"]
. - Since Docker now lets you create volumes with names, you can refer to those
volumes by name indocker-compose.yml
. For example,
volumes: ["mydatavolume:/data"]
will mount the volume named
mydatavolume
at the path/data
inside the container.
If the first component of an entry in volumes
starts with a .
, /
or
~
, it is treated as a path and expansion of relative paths is performed as
necessary. Otherwise, it is treated as a volume name and passed straight
through to Docker.
Read more on named volumes and volume drivers here:
https://github.com/docker/docker/blob/244d9c33/docs/userguide/dockervolumes.md
docker-compose build --pull
instructs Compose to pull the base image for
each Dockerfile before building.docker-compose pull --ignore-pull-failures
instructs Compose to continue
if it fails to pull a single service's image, rather than aborting.- You can now specify an IPC namespace in
docker-compose.yml
with theipc
option. - Containers created by
docker-compose run
can now be named with the
--name
flag. - If you install Compose with pip or use it as a library, it now works with
Python 3. image
now supports image digests (in addition to ids and tags), e.g.
image: "busybox@sha256:38a203e1986cf79639cfb9b2e1d6e773de84002feea2d4eb006b52004ee8502d"
ports
now supports ranges of ports, e.g.
ports:
- "3000-3005"
- "9000-9001:8000-8001"
docker-compose run
now supports a-p|--publish
parameter, much like
docker run -p
, for publishing specific ports to the host.docker-compose pause
anddocker-compose unpause
have been implemented,
analogous todocker pause
anddocker unpause
.- When using
extends
to copy configuration from another service in the same
Compose file, you can omit thefile
option. - Compose can be installed and run as a Docker image. This is an experimental
feature.
Bug fixes:
- All values for the
log_driver
option which are supported by the Docker
daemon are now supported by Compose. docker-compose build
can now be run successfully against a Swarm cluster.
Thanks @mnowster, @aanand, @moxiegirl, @albers, @mrfuxi, @viranch, @sdurrheimer, @charleswhchan, @ZJaffee, @villlem, @vdemeester, @TomasTomecek, @timbutler, @ticosax, @SvenDowideit, @stedur, @ronen, @md2perpe, @ggtools, @geron, @cweagans, @au-phiware
1.5.0 RC2
This is a release candidate for version 1.5.0 of Compose.
Note that Compose 1.5.0 requires Docker 1.8.0 or later.
To try it out, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.5.0rc2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Or pip install -U docker-compose==1.5.0rc2
if you prefer pip.
Here's what's new:
Major features:
- Compose is now available for Windows.
- Environment variables can be used in the Compose file. See
https://github.com/docker/compose/blob/129092b7/docs/yml.md#variable-substitution - Multiple compose files can be specified, allowing you to override
settings in the default Compose file. See
https://github.com/docker/compose/blob/129092b7/docs/reference/docker-compose.md
for more details. - Compose now produces better error messages when a file contains
invalid configuration. up
now waits for all services to exit before shutting down,
rather than shutting down as soon as one container exits.- Experimental support for the new docker networking system can be
enabled with the--x-networking
flag. Read more here:
https://github.com/docker/docker/blob/8fee1c20/docs/userguide/dockernetworks.md
New features:
- You can now optionally pass a mode to
volumes_from
, e.g.
volumes_from: ["servicename:ro"]
. - Since Docker now lets you create volumes with names, you can refer to those
volumes by name indocker-compose.yml
. For example,
volumes: ["mydatavolume:/data"]
will mount the volume named
mydatavolume
at the path/data
inside the container.
If the first component of an entry in volumes
starts with a .
, /
or
~
, it is treated as a path and expansion of relative paths is performed as
necessary. Otherwise, it is treated as a volume name and passed straight
through to Docker.
Read more on named volumes and volume drivers here:
https://github.com/docker/docker/blob/244d9c33/docs/userguide/dockervolumes.md
docker-compose build --pull
instructs Compose to pull the base image for
each Dockerfile before building.docker-compose pull --ignore-pull-failures
instructs Compose to continue
if it fails to pull a single service's image, rather than aborting.- You can now specify an IPC namespace in
docker-compose.yml
with theipc
option. - Containers created by
docker-compose run
can now be named with the
--name
flag. - If you install Compose with pip or use it as a library, it now works with
Python 3. image
now supports image digests (in addition to ids and tags), e.g.
image: "busybox@sha256:38a203e1986cf79639cfb9b2e1d6e773de84002feea2d4eb006b52004ee8502d"
ports
now supports ranges of ports, e.g.
ports:
- "3000-3005"
- "9000-9001:8000-8001"
docker-compose run
now supports a-p|--publish
parameter, much like
docker run -p
, for publishing specific ports to the host.docker-compose pause
anddocker-compose unpause
have been implemented,
analogous todocker pause
anddocker unpause
.- When using
extends
to copy configuration from another service in the same
Compose file, you can omit thefile
option. - Compose can be installed and run as a Docker image. This is an experimental
feature.
Bug fixes:
- All values for the
log_driver
option which are supported by the Docker
daemon are now supported by Compose. docker-compose build
can now be run successfully against a Swarm cluster.
Thanks @mnowster, @aanand, @moxiegirl, @albers, @mrfuxi, @viranch, @sdurrheimer, @charleswhchan, @ZJaffee, @villlem, @vdemeester, @TomasTomecek, @timbutler, @ticosax, @SvenDowideit, @stedur, @ronen, @md2perpe, @ggtools, @geron, @cweagans, @au-phiware
1.5.0 RC1
This is a release candidate for version 1.5.0 of Compose.
Note that Compose 1.5.0 requires Docker 1.8.0 or later.
To try it out, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.5.0rc1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Or pip install -U docker-compose==1.5.0rc1
if you prefer pip.
Here's what's new:
Major Features
- Compose is now available on windows.
- Environment variable can be used in the compose file. See
https://github.com/docker/compose/blob/129092b7/docs/yml.md#variable-substitution - Multiple compose files can be specified, allowing you to override
setting in the default compose file. See
https://github.com/docker/compose/blob/129092b7/docs/reference/docker-compose.md
for more details. - Configuration validation is now a lot more strict
up
now waits for all services to exit before shutting down- Support for the new docker networking can be enabled with
the--x-networking
flag
New Features
volumes_from
now supports a mode option allowing for read-only
volumes_from
- Volumes that don't start with a path indicator (
.
or/
) will now be
treated as a named volume. Previously this was a warning. --pull
flag added tobuild
--ignore-pull-failures
flag added topull
- Support for the
ipc
field added to the compose file - Containers created by
run
can now be named with the--name
flag - If you install Compose with pip or use it as a library, it now
works with Python 3 image
field now supports image digests (in addition to ids and tags)ports
now supports ranges of ports--publish
flag added torun
- New subcommands
pause
andunpause
- services may be extended from the same file without a
file
key in
extends
- Compose can be installed and run as a docker image. This is an experimental
feature.
Bug Fixes
- Support all
log_drivers
- Fixed
build
when running against swarm ~
is no longer expanded on the host when included as part of a container
volume path
Thanks @aanand, @mnowster, @moxiegirl, @mrfuxi, @shin-, @bfirsh, @albers @funkyfuture, @uvgroovy, @predakanga, @charleswhchan, @ggtools, and everyone else who contributed to this release!
1.4.2
Firstly, note that Compose 1.4.2 requires Docker 1.7.0 or later.
Secondly, if you're a Mac user, the Docker Toolbox will install Compose 1.4.2 for you, alongside the latest versions of the Docker Engine, Machine and Kitematic.
Otherwise, you can use the usual commands to install/upgrade. Either download the binary:
curl -L https://github.com/docker/compose/releases/download/1.4.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Or install the PyPi package:
pip install -U docker-compose==1.4.2
This release fixes a regression in the 1.4.1 release that would cause docker-compose up
without the -d
option to exit immediately.
1.4.1
Firstly, note that Compose 1.4.1 requires Docker 1.7.0 or later.
Secondly, if you're a Mac user, the Docker Toolbox will install Compose 1.4.1 for you, alongside the latest versions of the Docker Engine, Machine and Kitematic.
Otherwise, you can use the usual commands to install/upgrade. Either download the binary:
curl -L https://github.com/docker/compose/releases/download/1.4.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Or install the PyPi package:
pip install -U docker-compose==1.4.1
The following issues were fixed in this release:
- Some configuration changes (notably changes to
links
,volumes_from
, and
net
) were not properly triggering a container recreate as part of
docker-compose up
. docker-compose up <service>
was showing logs for all services instead of
just the specified services.- Containers with custom container names were showing up in logs as
service_number
instead of their custom container name. - When scaling a service sometimes containers would be recreated even when
the configuration had not changed.
1.4.0
Firstly, note that Compose 1.4.0 requires Docker 1.7.1 or later.
Secondly, if you're a Mac user, the Docker Toolbox will install Compose 1.4.0 for you, alongside the latest versions of the Docker Engine, Machine and Kitematic.
Otherwise, you can use the usual commands to install/upgrade. Either download the binary:
curl -L https://github.com/docker/compose/releases/download/1.4.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Or install the PyPi package:
pip install -U docker-compose==1.4.0
Here's what's new:
- By default,
docker-compose up
now only recreates containers for services whose configuration has changed since they were created. This should result in a dramatic speed-up for many applications.
The experimental --x-smart-recreate
flag which introduced this feature in Compose 1.3.0 has been removed, and a --force-recreate
flag has been added for when you want to recreate everything.
- Several of Compose's commands -
scale
,stop
,kill
andrm
- now perform actions on multiple containers in parallel, rather than in sequence, which will run much faster on larger applications. - You can now specify a custom name for a service's container with
container_name
. Because Docker container names must be unique, this means you can't scale the service beyond one container. - You no longer have to specify a
file
option when usingextends
- it will default to the current file. - Service names can now contain dots, dashes and underscores.
- Compose can now read YAML configuration from standard input, rather than from a file, by specifying
-
as the filename. This makes it easier to generate configuration dynamically:
$ echo 'redis: {"image": "redis"}' | docker-compose --file - up
- There's a new
docker-compose version
command which prints extended information about Compose's bundled dependencies. docker-compose.yml
now supportslog_opt
as well aslog_driver
, allowing you to pass extra configuration to a service's logging driver.docker-compose.yml
now supportsmemswap_limit
, similar todocker run --memory-swap
.- When mounting volumes with the
volumes
option, you can now pass in any mode supported by the daemon, not just:ro
or:rw
. For example, SELinux users can pass:z
or:Z
. - You can now specify a custom volume driver with the
volume_driver
option indocker-compose.yml
, much likedocker run --volume-driver
. - A bug has been fixed where Compose would fail to pull images from private registries serving plain (unsecured) HTTP. The
--allow-insecure-ssl
flag, which was previously used to work around this issue, has been deprecated and now has no effect. - A bug has been fixed where
docker-compose build
would fail if the build depended on a private Hub image or an image from a private registry. - A bug has been fixed where Compose would crash if there were containers which the Docker daemon had not finished removing.
- Two bugs have been fixed where Compose would sometimes fail with a "Duplicate bind mount" error, or fail to attach volumes to a container, if there was a volume path specified in
docker-compose.yml
with a trailing slash.
Thanks @mnowster, @dnephin, @ekristen, @funkyfuture, @jeffk and @lukemarsden!