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 upnow 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,killandrm- 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
fileoption 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 versioncommand which prints extended information about Compose's bundled dependencies. docker-compose.ymlnow supportslog_optas well aslog_driver, allowing you to pass extra configuration to a service's logging driver.docker-compose.ymlnow supportsmemswap_limit, similar todocker run --memory-swap.- When mounting volumes with the
volumesoption, you can now pass in any mode supported by the daemon, not just:roor:rw. For example, SELinux users can pass:zor:Z. - You can now specify a custom volume driver with the
volume_driveroption 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-sslflag, 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 buildwould 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.ymlwith a trailing slash.
Thanks @mnowster, @dnephin, @ekristen, @funkyfuture, @jeffk and @lukemarsden!