Managing Docker on Ubuntu 15.04 Vivid

There were some big changes introduced on Ubuntu 15.04. Systemd is now the default system manager tool instead of UpStart like in previous Ubuntu releases. There is a good comparison in the Ubuntu wiki.

So how does that affect Docker?

  1. Configuring Docker
  2. Accessing Logs
  3. Managing the service

Configuring Docker

With UpStart the file /etc/default/docker had to be modified to configure settings for the docker demon. Now with Systemd the file /lib/systemd/system/docker.service needs to be modified instead.

Example /lib/systemd/system/docker.service

Description=Docker Application Container Engine
Documentation= docker.socket

ExecStart=/usr/bin/docker daemon -H fd:// -H tcp:// -H unix:///var/run/docker.sock --bip= --dns=


To enable the remote API just modify the ExecStart attribute under the service category to ExecStart=/usr/bin/docker daemon -H fd:// -H tcp:// -H unix:///var/run/docker.sock

Just as a note you might also find the file /etc/systemd/system/ However, it gets overwritten with the settings in the /lib/systemd/system/docker.service

Note: Make sure you reload the service daemon so the changes can take effect: systemctl daemon-reload

Accessing Logs

With UpStart all the Docker daemon logs were stored at /var/log/upstart/docker.log Now with Sytemd you need to use journalctl

  • To dump all the logs: journalctl -u docker.service
  • To follow the logs: journalctl -u docker.service -f

Managing the service

With UpStart to manage the Docker service the service tool would allow to get the status, start, stop and restart Docker. To enable Docker to start on boot the update-rc.d tool would manage its settings.

Now with Systemd we need to use the systemctl tools instead

  • Get status of the Docker service: systemctl status docker
  • Enable Docker service to start on boot: systemctl enable docker