Releases: docker/compose
1.4.0 RC1
This is a release candidate for version 1.4.0 of Compose. To try it out, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.4.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.4.0rc1
if you prefer Pip.
Here are the most important changes in 1.4.0:
- 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
.
Thanks @dnephin, @ekristen, @funkyfuture, @jeffk and @mnowster!
1.3.3
If you're upgrading from Compose 1.2.0 or earlier, this release contains breaking changes - be sure to read the 1.3.0 release notes.
To install Compose 1.3.3, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.3.3/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.3.3
if you prefer Pip.
Two regressions have been fixed:
- When stopping containers gracefully, Compose was setting the timeout to 0, effectively forcing a SIGKILL every time.
- Compose would sometimes crash depending on the formatting of container data returned from the Docker API.
1.3.2
If you're upgrading from Compose 1.2.0 or earlier, this release contains breaking changes - be sure to read the 1.3.0 release notes.
To install Compose 1.3.2, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.3.2/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.3.2
if you prefer Pip.
The following bugs have been fixed:
- When there were one-off containers created by running
docker-compose run
on an older version of Compose,docker-compose run
would fail with a name collision. Compose now shows an error if you have leftover containers of this type lying around, and tells you how to remove them. - Compose was not reading Docker authentication config files created in the new location,
~/docker/config.json
, and authentication against private registries would therefore fail. - When a container had a pseudo-TTY attached, its output in
docker-compose up
would be truncated. docker-compose up --x-smart-recreate
would sometimes fail when an image tag was updated.docker-compose up
would sometimes create two containers with the same numeric suffix.docker-compose rm
anddocker-compose ps
would sometimes list services that aren't part of the current project (though no containers were erroneously removed).- Some
docker-compose
commands would not show an error if invalid service names were passed in.
Thanks @dano, @josephpage, @kevinsimper, @lieryan, @phemmer, @soulrebel and @sschepens!
1.3.1
If you're upgrading from Compose 1.2.0 or earlier, this release contains breaking changes - be sure to read the 1.3.0 release notes.
To install Compose 1.3.1, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.3.1/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.3.1
if you prefer Pip.
The following bugs have been fixed:
docker-compose build
would always attempt to pull the base image before building.docker-compose help migrate-to-labels
failed with an error.- If no network mode was specified, Compose would set it to "bridge", rather than allowing the Docker daemon to use its configured default network mode.
1.3.0
To install Compose 1.3.0, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.3.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
if you prefer Pip.
Optionally, you can also install command completion for bash or zsh.
Firstly, two important notes:
- This release contains breaking changes, and you will need to either remove or migrate your existing containers before running your app - see the upgrading section of the install docs for details.
- Compose now requires Docker 1.6.0 or later.
We've done a lot of work in this release to remove hacks and make Compose more stable:
- Compose now uses container labels, rather than names, to keep track of containers. This makes Compose both faster and easier to integrate with your own tools.
- Compose no longer uses "intermediate containers" when recreating containers for a service. This makes
docker-compose up
less complex and more resilient to failure.
There are some new features:
-
docker-compose up
has an experimental new behaviour: it will only recreate containers for services whose configuration has changed indocker-compose.yml
. This will eventually become the default, but for now you can take it for a spin:$ docker-compose up --x-smart-recreate
-
When invoked in a subdirectory of a project,
docker-compose
will now climb up through parent directories until it finds adocker-compose.yml
.
Several new configuration keys have been added to docker-compose.yml
:
dockerfile
, likedocker build --file
, lets you specify an alternate Dockerfile to use withbuild
.labels
, likedocker run --labels
, lets you add custom metadata to containers.extra_hosts
, likedocker run --add-host
, lets you add entries to a container's/etc/hosts
file.pid: host
, likedocker run --pid=host
, lets you reuse the same PID namespace as the host machine.cpuset
, likedocker run --cpuset-cpus
, lets you specify which CPUs to allow execution in.read_only
, likedocker run --read-only
, lets you mount a container's filesystem as read-only.security_opt
, likedocker run --security-opt
, lets you specify security options.log_driver
, likedocker run --log-driver
, lets you specify a log driver.
Many bugs have been fixed, including the following:
- The output of
docker-compose run
was sometimes truncated, especially when running under Jenkins. - A service's volumes would sometimes not update after volume configuration was changed in
docker-compose.yml
. - Authenticating against third-party registries would sometimes fail.
docker-compose run --rm
would fail to remove the container if the service had arestart
policy in place.docker-compose scale
would refuse to scale a service beyond 1 container if it exposed a specific port number on the host.- Compose would refuse to create multiple volume entries with the same host path.
Thanks @ahromis, @albers, @aleksandr-vin, @antoineco, @ccverak, @chernjie, @dnephin, @edmorley, @fordhurley, @josephpage, @KyleJamesWalker, @lsowen, @mchasal, @noironetworks, @sdake, @sdurrheimer, @sherter, @stephenlawrence, @thaJeztah, @thieman, @turtlemonvh, @twhiteman, @vdemeester, @xuxinkun and @zwily!
1.3.0 RC3
This is a release candidate for version 1.3.0 of Docker Compose. To try it out, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.3.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.3.0rc3
if you prefer Pip.
This release contains breaking changes, and you will need to either remove or migrate your existing containers before running your app - see the upgrading section of the install docs for details.
There are lots of new things in 1.3 - have a look at the RC1 changelog for details.
On top of RC2, several bugs have been fixed:
docker-compose scale
would refuse to scale a service beyond 1 container if it exposed a specific port number on the host.- Container creation would sometimes fail with a "Duplicate volume" error.
- Compose would refuse to create multiple volume entries with the same host path.
1.3.0 RC2
This is a release candidate for version 1.3.0 of Docker Compose. To try it out, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.3.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.3.0rc2
if you prefer Pip.
This release contains breaking changes, and you will need to either remove or migrate your existing containers before running your app - see the upgrading section of the install docs for details.
There are lots of new things in 1.3 - have a look at the RC1 changelog for details.
In this RC, several bugs have been fixed:
- SSL certificate verification would sometimes fail.
docker-compose run --rm
was not removing the container when finished.docker-compose up
was printing duplicate log messages when recreating containers.
1.3.0 RC1
This is a release candidate for version 1.3.0 of Docker Compose. To try it out, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.3.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.3.0rc1
if you prefer Pip.
Now, two important notes:
- This release contains breaking changes, and you will need to either remove or migrate your existing containers before running your app - see the upgrading section of the install docs for details.
- Compose now requires Docker 1.6.0 or later.
We've done a lot of work in this release to remove hacks and make Compose more stable:
- Compose now uses Docker labels, rather than container names, to keep track of containers. This is both cleaner and more performant.
- Compose no longer uses "intermediate containers" when recreating containers for a service. This makes
docker-compose up
less complex and more resilient to failure.
There are some new features:
-
docker-compose up
has an experimental new behaviour: it will only recreate containers for services whose configuration has changed indocker-compose.yml
. This will eventually become the default, but for now you can take it for a spin:$ docker-compose up --x-smart-recreate
-
When invoked in a subdirectory of a project,
docker-compose
will now climb up through parent directories until it finds adocker-compose.yml
.
Several new configuration keys have been added to docker-compose.yml
:
dockerfile
, likedocker build --file
, lets you specify an alternate Dockerfile to use withbuild
.labels
, likedocker run --labels
, lets you add custom metadata to containers.extra_hosts
, likedocker run --add-host
, lets you add entries to a container's/etc/hosts
file.pid: host
, likedocker run --pid=host
, lets you reuse the same PID namespace as the host machine.cpuset
, likedocker run --cpuset-cpus
, lets you specify which CPUs to allow execution in.read_only
, likedocker run --read-only
, lets you mount a container's filesystem as read-only.security_opt
, likedocker run --security-opt
, lets you specify security options.log_driver
, likedocker run --log-driver
, lets you specify a log driver.
Many bugs have been fixed, including the following:
- The output of
docker-compose run
was sometimes truncated, especially when running under Jenkins. - A service's volumes would sometimes not update after volume configuration was changed in
docker-compose.yml
. - Authenticating against third-party registries would sometimes fail.
docker-compose run --rm
would fail to remove the container if the service had arestart
policy in place.
Thanks @ahromis, @albers, @aleksandr-vin, @antoineco, @ccverak, @chernjie, @dnephin, @josephpage, @KyleJamesWalker, @lsowen, @mchasal, @sdake, @sherter, @stephenlawrence, @turtlemonvh, @vdemeester, @xuxinkun and @zwily!
1.2.0
To install Compose 1.2.0, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Optionally, you can also install command completion for the bash shell.
Here's what's new:
docker-compose.yml
now supports anextends
option, which enables a service to inherit configuration from another service in another configuration file. This is really good for sharing common configuration between apps, or for configuring the same app for different environments. Here's the documentation.- When using Compose with a Swarm cluster, containers that depend on one another will be co-scheduled on the same node. This means that most Compose apps will now work out of the box, as long as they don't use
build
. - Repeated invocations of
docker-compose up
when using Compose with a Swarm cluster now work reliably. - Directories passed to
build
, filenames passed toenv_file
and volume host paths passed tovolumes
are now treated as relative to the directory of the configuration file, not the directory thatdocker-compose
is being run in. In the majority of cases, those are the same, but if you use the-f|--file
argument to specify a configuration file in another directory, this is a breaking change. - A service can now share another service's network namespace with
net: container:<service>
. volumes_from
andnet: container:<service>
entries are taken into account when resolving dependencies, sodocker-compose up <service>
will correctly start all dependencies of<service>
.docker-compose run
now accepts a--user
argument to specify a user to run the command as, just likedocker run
.- The
up
,stop
andrestart
commands now accept a--timeout
(or-t
) argument to specify how long to wait when attempting to gracefully stop containers, just likedocker stop
. docker-compose rm
now accepts-f
as a shorthand for--force
, just likedocker rm
.
Thanks, @abesto, @albers, @alunduil, @dnephin, @funkyfuture, @gilclark, @IanVS, @KingsleyKelly, @knutwalker, @thaJeztah and @vmalloc!
1.2.0 RC4
This is a release candidate for Compose 1.2.0. To try it out, run the following commands:
curl -L https://github.com/docker/compose/releases/download/1.2.0rc4/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Optionally, you can also install command completion for the bash shell.
On top of the changes listed below for RC1-RC3, the following bugs have been fixed:
- Environment variables and the user's home directory (~) were not expanding properly in
volumes
host paths.
Here are the changes for RC3:
- When copying a service's configuration with
extends
,image
andbuild
could come into conflict, resulting in an error, as it makes no sense to have both defined. Each now overwrites the other: if a service withimage
defined is extended andbuild
is added, theimage
entry will be removed. - When copying a service's configuration with
extends
, if both services defined a multi-value option such asports
ordns
, the original value would be completely discarded. They are now concatenated instead. - When a relative path is supplied to
build
, it is treated as relative to the directory of the configuration file, not the directory thatdocker-compose
is being run in. In the majority of cases, those are the same, but if you use the-f|--file
argument to specify a configuration file in another directory, this is a breaking change.
Here are the changes for RC2:
- A bug has been fixed where containers were being created with blank entries for "Dns" and "DnsSearch", causing DNS lookups from within a container to fail.
Here are the changes for RC1:
docker-compose.yml
now supports anextends
option, which enables a service to inherit configuration from another service in another configuration file. This is really good for sharing common configuration between apps, or for configuring the same app for different environments. Here's the documentation.- When using Compose with a Swarm cluster, containers that depend on one another will be co-scheduled on the same node. This means that most Compose apps will now work out of the box, as long as they don't use
build
. - Repeated invocations of
docker-compose up
when using Compose with a Swarm cluster now work reliably. - Filenames in
env_file
and volume host paths involumes
are now treated as relative to the directory of the configuration file, not the directory thatdocker-compose
is being run in. In the majority of cases, those are the same, but if you use the-f|--file
argument to specify a configuration file in another directory, this is a breaking change. - A service can now share another service's network namespace with
net: container:<service>
. volumes_from
andnet: container:<service>
entries are taken into account when resolving dependencies, sodocker-compose up <service>
will correctly start all dependencies of<service>
.- Problems with authentication when using images from third-party registries have been fixed.
docker-compose run
now accepts a--user
argument to specify a user to run the command as, just likedocker run
.- The
up
,stop
andrestart
commands now accept a--timeout
(or-t
) argument to specify how long to wait when attempting to gracefully stop containers, just likedocker stop
. docker-compose rm
now accepts-f
as a shorthand for--force
, just likedocker rm
.
Thanks, @abesto, @albers, @alunduil, @dnephin, @funkyfuture, @gilclark, @IanVS, @KingsleyKelly, @knutwalker, @moysesb, @thaJeztah and @vmalloc!