ciplogic.com
Live with grace. Write superb software.

So if you follow up with Docker, you might have found out that the default storage that is provided with a normal Docker installation, is backed by the mighty aufs, created by the awesome Junjiro Okajima.

But out there there is another file system that is faster, with smaller footprint, etc. It's named OverlayFS, and was merged in the main kernel. Sounds to good to be true? Well read about it.

TL;DR Docker With OverlayFS on Ubuntu 14.04:

apt-get install linux-generic-lts-vivid linux-headers-generic-lts-vivid

Reboot

wget get.docker.com -O - | sh
service docker stop
echo 'DOCKER_OPTS="-s overlay"' >> /etc/default/docker
service docker start

Details

Now, this file system is available only from kernel version 3.18 and up. If you just installed Ubuntu 14.04, as of this date (10th of November, 2015), you should have 3.19 already installed. If you have an older existing Ubuntu 14.04 you need to update your kernel manually.

 

So let's see the current version of the kernel:

# uname -a
Linux raptor-vbox 3.19.0-32-generic #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

In my case looks good (I actually already updated).

If the kernel version is NOT 3.19, you need to update, but don't worry it's super easy:

Install the new kernel (if not already on 3.19)

Thanks to the Ubuntu LTS Hardware Enablement Stack, the newer kernel is available (and supported) for install.

# apt-get install linux-generic-lts-vivid linux-headers-generic-lts-vivid

Afterwards reboot, and check if you got the new Kernel:

# uname -a
Linux raptor-vbox 3.19.0-32-generic #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Yay!

Install Docker

Now, if I would be you, I would do that on a new Docker instance. If you already have docker installed, I assume you removed it, and deleted the data (option b. is you export your images, and reimport them):

Remove Old Docker (optional)

service docker stop
apt-get remove docker-engine
rm -fr /var/lib/docker

Install Docker

wget get.docker.com -O - | sh

Use OverlayFS instead of aufs

Now after the install docker will be already running, but using the aufs storage:

# docker info | grep Storage
WARNING: No swap limit support
Storage Driver: aufs

So let's change that:

service docker stop
echo 'DOCKER_OPTS="-s overlay"' >> /etc/default/docker
service docker start

Then let's check it now:

# docker info | grep Storage
WARNING: No swap limit support
Storage Driver: overlay

Done! Great Job.

 

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.