Docker v1.13 is pretty much Awesome

Image Source & Credit: https://docs.docker.com/engine/understanding-docker/

In this blog, we’ll discuss the new features added in Docker v1.13.

System commands

Docker v1.13 introduces the system commands to help users check how much disk space Docker is using, display systemwide docker information and get real time events from the server.

To show used space by docker, you can execute:

docker system df

To show system wide information, you can use:

docker system info

A set of Management commands

Docker v1.13 introduces the management commands for container, image, plugin, secret, stack and system. Now, you can list the container or create the container with the help of:

docker container ls 
OR docker container list
docker container create <OPTIONS> <container-name>

Similarly for image, plugin, secret, stack and system.

These changes gives a clear visibility of top commands to the users while using the docker CLI. Though the old command syntax is still supported in Docker v1.13.

Clean up commands

Docker 1.13 introduces clean-up commands to help users removed unused data. To remove all unused containers, images, networks and volumes, you just need to execute:

docker system prune

For removing containers, images, networks and volumes, you can execute:

docker container prune
docker image prune
docker network prune
docker volume prune

Using Docker Compose files for deploying Swarm mode services

Docker v1.13 adds compose file support to the docker stack deploy command so that services can be deployed using a docker-compose.yml file directly. With this, you can now specify the number of desired instances, constraints and rolling update policies for each service.

Deploying a multi-host, multi-service stack is now as simple as:

docker stack deploy --compose-file=docker-compose.yml <stack-name> 

Debugging Services made simpler

Docker 1.13 adds the docker service logs command to help users debug services much simpler. Now instead of having to track down hosts and containers powering a particular service and pulling logs from those containers, docker service logs pulls logs from all containers running a service and streams them to your console.

To use this feature, you need to start the docker daemon in experimental mode using--experimental flag.

Image build improvements

Docker v1.13 adds a new feature of taking all the filesystem layers produced by a build and collapsing them into a single new layer, with the help of --squash flag. This can help simplify the creation of minimal docker images, but might result in slightly higher overhead while pushing & pulling of images. For using the squash feature, you need to start the docker daemon with the --experimental flag.

Docker 1.13 also supports the feature of compressing the build context, which is being sent from CLI to docker daemon using the --compress flag. This will help in speeding up builds done on remote daemons by reducing down the amount of data sent.

Docker 1.13 also adds--network flag to docker build command.

Improved CPU Management

Docker 1.13 has added a --cpus flag, to ease users limit the cpus of the container. Previously, cpushares and cpuset takes much more thought and planning to use it correctly for limiting the CPU cores of a container.

With Docker 1.13, if you want to a container to be limited to one cpu core, then you can now simply add --cpus 1.0 along with docker run/create command.

Networking

Docker 1.13 adds the --attachable network support to enable docker run to work in swarm-mode overlay network. Also, adds the support for host port PublishMode in services using the --publish option in docker service create.

One can now also see the peer nodes in docker network inspect for swarm overlay networks.

Improved Runtime

Docker v1.13 adds a --shutdown-timeout daemon flag to specify the default timeout (in secs) to stop containers gracefully before daemon exit and --stop-timeout to specify the timeout value (in secs) for individual containers to stop.

With docker 1.13, now comes the support for --cpu-rt-period and --cpu-rt-runtime flags, allowing containers to run real-time threads when CONFIG_RT_GROUP_SCHED is enabled in the kernel.

Inbuilt Init Process

Docker 1.13 also adds--init flag on dockerd and docker run to run a zombie-reaping init process as PID 1 inside the container.

A new daemon flag --init-path is added with dockerd to allow configuring the path to the docker-init binary.

Secret Management

Docker 1.13 now adds the secret management command docker secret for managing secrets.

Improved Service CLI

Docker 1.13 now adds support for templating service options (hostname, mounts, and environment variables). You can now also add --dns, --dns-opt, and --dns-search while creating a service. Also,--hostname and --host flags are added to docker service createcommand.

With docker service update , Docker 1.13 supports the--host-add, --host-rm , --update-max-failure-ratio, --update-monitor and --rollback flags.

The global services can be displayed by docker service ls command.


Source: ~ Docker Docs

Disclaimer: Content and image source has been mentioned. Special Credit to concerned folks.