Docker 1.13 is here

Docker 1.13 is here and it comes bearing gifts: new features, improvements and fixes. It builds on and improves Docker swarm mode introduced in Docker 1.12 and has lots of other fixes. Let’s take a look at the highlights.

What’s new in Docker 1.13?

Deploy swarm mode services with compose-files

The latest release adds Compose-file support to the `docker stack deploy` command to allow services to be deployed using a `docker-compose.yml` file directly. Powering this is a major effort to extend the swarm service API to make it more flexible and useful. The list of benefits includes the following: service constraints, specifying the number of desired instances for each service and rolling update policies.

This is how you deploy a multi-host, multi-service stack:

docker stack deploy --compose-file=docker-compose.yml my_stack

Improved CLI backwards compatibility

One of the perks of this release is that starting with 1.13, newer CLIs can talk to older daemons. It also includes feature negotiation to make sure proper errors are returned if a new client is trying to use features that are not supported in an older daemon. The improved CLI backwards compatibility offers benefits such as boosted interoperability and the ability to easily manage Docker installs with different versions from the same machine.

Clean-up commands

This release also has two nifty commands to help users understand how much disk space Docker is using, and help remove unused data.

docker system df will show used space, similar to the unix tool df

docker system prune will remove all unused data.

The second can also be used to clean up just some types of data. For example: docker volume prune removes unused volumes only.

CLI restructured

The core engineering team has regrouped every command to sit under the logical object it’s interacting with. The benefits are the following: these changes allow them to clean up the Docker CLI syntax, improve help text and make Docker simpler to use. Although the old command syntax is still supported, they encourage users to adopt the new syntax.

Monitoring improvements

docker service logs is a new experimental command which promises to make debugging services much simpler. Instead of having to track down hosts and containers powering a certain service and pulling logs from those containers, docker service logs pulls logs from all containers running a service and streams them to your console.

Build improvements

docker build has a new experimental --squash flag. According to the announcement, when squashing, Docker will take all the filesystem layers produced by a build and collapse them into a single new layer. The benefit is that the process of creating minimal container images is simplified; however, it may result in slightly higher overhead when images are moved around (since squashed layers can no longer be shared between images). Docker still caches individual layers to make subsequent builds fast.