Chris Swan's Weblog


Home | Pages | Archives


Using Overlay file system with Docker on systemd Ubuntu (14.10+)

December 24, 2015 3:17 pm

Back in March I wrote about Using Overlay file system with Docker on Ubuntu – those instructions applied to Ubuntu before the switch to systemd e.g. 14.04 and earlier.

The move to systemd means that changes to /etc/default/docker don’t have any effect any more.

To get systemd to dance along to our tune needs a file like this:

/etc/systemd/system/docker.service.d/overlay.conf

[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// --storage-driver=overlay

To make this work use the following script (or get it from gist to avoid silly copy/past replacement of < with &lt;):


sudo mkdir /etc/systemd/system/docker.service.d
sudo bash -c 'cat <<EOF > /etc/systemd/system/docker.service.d/overlay.conf
[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// --storage-driver=overlay
EOF'
sudo systemctl daemon-reload
sudo systemctl restart docker

Now when you run ‘sudo docker info’ you should see something like:


...
Storage Driver: overlay
 Backing Filesystem: extfs
...

At least you didn’t need to upgrade the kernel this time – small mercies.

NB this is somewhat (inaccurately right now) documented in Control and configure Docker with systemd – I can feel a PR coming on.

Posted by Chris Swan

Categories: Docker, howto

Tags: , , , ,

One Response to “Using Overlay file system with Docker on systemd Ubuntu (14.10+)”

  1. […] Update 24 Dec 2015 If you’re using Ubuntu after the switch to systemd (14.10+) then you need these instructions. […]

    By Using Overlay file system with Docker on Ubuntu | Chris Swan's Weblog on December 24, 2015 at 3:42 pm

Leave a Reply



Mobile Site | Full Site


Get a free blog at WordPress.com Theme: WordPress Mobile Edition by Alex King.