1.6.0
Note that Compose 1.6.0 requires Docker Engine 1.9.1 or later, or 1.10.0 if you're using version 2 of the Compose File format (see the changelog below).
If you're a Mac or Windows user, the Docker Toolbox will install Compose 1.6.0 for you, alongside the latest versions of Docker Engine, Machine and Kitematic.
Alternatively, you can use the usual commands to install or upgrade:
curl -L https://github.com/docker/compose/releases/download/1.6.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.
Major Features
- Compose 1.6 introduces a new format for
docker-compose.ymlwhich 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.
Check the upgrade guide for full details.
- 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 aren't ready yet, 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.
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
buildand animagekey if you're using the new file format.docker-compose buildwill build the image and tag it with the name you've specified, whiledocker-compose pullwill attempt to pull it. - There's a new
eventscommand 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. - There's a new
depends_onoption for specifying dependencies between services. This enforces the order of startup, and ensures that when you rundocker-compose up SERVICEon a service with dependencies, those are started as well.
New Features
- Added a new command
configwhich validates and prints the Compose configuration after interpolating variables, resolving relative paths, and merging multiple files andextends. - Added a new command
createfor creating containers without starting them. - Added a new command
downto stop and remove all the resources created byupin a single command. - Added support for the
cpu_quotaconfiguration option. - Added support for the
stop_signalconfiguration option. - Commands
start,restart,pause, andunpausenow exit with an error status code if no containers were modified. - Added a new
--abort-on-container-exitflag toupwhich causesupto stop all container and exit once the first container exits. - Removed support for
FIG_FILE,FIG_PROJECT_NAME, and no longer readsfig.ymlas a default Compose file location. - Removed the
migrate-to-labelscommand. - Removed the
--allow-insecure-sslflag.
Bug Fixes
- Fixed a validation bug that prevented the use of a range of ports in the
exposefield. - Fixed a validation bug that prevented the use of arrays in the
entrypointfield if they contained duplicate entries. - Fixed a bug that caused
ulimitsto be ignored when used withextends. - Fixed a bug that prevented ipv6 addresses in
extra_hosts. - Fixed a bug that caused
extendsto 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
upandlogs. - Fixed a bug that caused
Noneto be printed as the network driver name when the default network driver was used. - Fixed a bug where using the string form of
dnsordns_searchwould cause an error. - Fixed a bug where a container would be reported as "Up" when it was in the restarting state.
- Fixed a confusing error message when DOCKER_CERT_PATH was not set properly.
- Fixed a bug where attaching to a container would fail if it was using a non-standard logging driver (or none at all).
- Fixed a bug where some config options, such as
linksandports, were not properly merged when using multiple Compose files. - Fixed a bug where setting COMPOSE_PROJECT_NAME to an empty string would result in an empty project name, rather than falling back to the directory name.
Thanks @dnephin, @shin-, @sdurrheimer, @albers, @dbonev, @moxiegirl, @scipetr, @schmunk42, @rtlong, @nubs, @mustafau, @jzvelc, @hourliert, @gutweiler, @alf, @SvenDowideit and @garrettheel!