ciplogic.com
Live with grace. Write superb software.

Since I already wrote an article on having Docker running with OverlayFS on Ubuntu 14.04, I won't go over all of it again. Here is a not so quick link on why it's cool to have it. Basically it's faster, harder, better, stronger, and scales better.

The only note is that since Ubuntu comes with v4 Kernels, there is no need to install any more packages except docker itself. The commands below must be ran as root.

TL;DR Docker With OverlayFS on Ubuntu 16.04:

wget https://get.docker.com -O - | sh
 
systemctl stop docker
 
CONFIGURATION_FILE=$(systemctl show --property=FragmentPath docker | cut -f2 -d=)
cp $CONFIGURATION_FILE /etc/systemd/system/docker.service
 
perl -pi -e 's/^(ExecStart=.+)$/$1 -s overlay/' /etc/systemd/system/docker.service
 
systemctl daemon-reload
systemctl start docker

Details

The first step just installs docker, straight from docker.com.

wget https://get.docker.com -O - | sh

Awesome. The problem now is that it runs with the aufs driver, so we need to stop docker.

systemctl stop docker

The next step is to create a copy of the current configuration file from the system itself. We will override the configuration from the system by copying it as /etc/systemd/system/docker.service .

CONFIGURATION_FILE=$(systemctl show --property=FragmentPath docker | cut -f2 -d=)
cp $CONFIGURATION_FILE /etc/systemd/system/docker.service

Now, we change the ExecStart line by appending the OverlayFS setting:

perl -pi -e 's/^(ExecStart=.+)$/$1 -s overlay/' /etc/systemd/system/docker.service

We now tell systemd that the configuration files have updated, and start docker again:

systemctl daemon-reload
systemctl start docker

Done. Enjoy.

 

Disqus Comments

comments powered by Disqus

Germanium

The one to rule them all. The browsers that is.

SharpKnight

SharpKnight is an Android chess game.

MagicGroup

MagicGroup is an eclipse plugin.