Docker Compose 1.4 is out, boasting much faster stop and start times for apps than Compose’s previous incantation, due to a change in the default running of `docker-compose up`. It now only recreates containers for services whose configurations have changed since those services were created.
The `scale`, `stop`, `kill` and `rm` commands also now perform actions on multiple containers in parallel, rather than in sequence, which significantly improves run times on larger applications.
Another noticeable difference with the new Docker-Compose 1.4 is the ability to create custom container names by passing `container_name` option in a Compose file. Because Docker container names must be unique, users can no longer scale the service passed one container.
Service names can now contain dots, dashes and underscores.
The `–x-smart-recreate` option that was introduced in Compose 1.3 has been removed. Instead, users can use the `–force-recreate` flag to recreate everything.
Users no longer have to specify a file option when using `extends`. Rather, `extends` will default to the current file.
Compose 1.4 also makes it easier to generate configuration dynamically, as Compose can now read YAML configuration from standard input, rather than from a file, by specifying – as the filename.
Other changes with Compose 1.4 include:
* A new docker-compose version command that prints extended information about Compose’s bundled dependencies
* Support in `docker-compose.yml` for log_opt and log_driver, which allows users to pass extra configuration to a service’s logging driver
* Support in `docker-compose.yml` for `memswap_limit`, which is similar to `docker run –memory-swap`
* The ability, when mounting volumes with the volumes option, to pass in any mode supported by the daemon, not just `:ro` or `:rw`. For example, SELinux users can pass `:z` or `:Z` and
* The ability to specify a custom volume driver with the volume_driver option in `docker-compose.yml`, much like `docker run –volume-driver`.
Compose 1.4 also comes with the fixing of many bugs, including:
* A bug that caused Compose to fail to pull images from private registries serving plain (unsecured) HTTP. Previously, users could work around this issue with `–allow-insecure-ssl` flag, but that has been deprecated and now has no effect.
* A bug has that caused `docker-compose build` to fail if the build depended on a private hub image or an image from a private registry
* A bug that caused Compose to crash if there were containers the Docker daemon had not finished removing.
* Two bugs that occasionally caused Compose to fail with a “Duplicate bind mount” error or to fail to attach volumes to a container, if there was a volume path specified in `docker-compose.yml` with a trailing slash
Mac OS X users can download the upgrade to Compose 1.4 via the Toolbox, and other users can download the upgrade via the usual routes.