28K Views

Docker Installation on Ubuntu 16.04 with Aufs Storage Driver

In our previous blogs, we have been busy in establishing various multi-tier docker architecture, working around docker images and containers and understanding their communication. Although we learnt a great many things and we are ready to explore more complex architectures but I think we have to revisit Docker Basics more often than we do. As with the Docker community keeps updating themselves with optimisation and patches on various levels, we need to get ourselves updated as well. So I decided to discuss Docker installation with Aufs storage diver.

While working on Docker  projects, we came across various challenges. As we can’t presume Docker to be perfect for every environment, we had to tweak a little in configurations, override default values. etc that were best for our development.

 

Zombie Images and Container

 

One of the frequent occurring  problems that I came across is the issues with Orphan (dead) image and containers. Even lots pf people must have faced this issue that Images and containers are still consuming Disk space even after containers are terminated, or images are removed. We call them to be zombie images and containers, still haunting us even after they are presumably gone.

As they were sticking to our disk size, we started exploring storage driver that was deployed for docker storage. We were using overlay storage. We found that even after container and image termination, data was still present in /var/lib/docker/overlay2. 

Overlay2 storage has been used as default storage driver now for Docker community edition, but earlier it was the aufs storage that was used as default storage for Docker. So we decided to switch or Storage driver back to aufs. Choosing Aufs storage curbed the orphan images and container problem. So I decided to write a blog on fresh installation of Docker community version on Ubuntu 16.04 with aufs storage.

 

Docker Installation on Ubuntu 16.04

 

First of all, update and upgrade your Ubuntu 16.04 server as,

As we have already discussed, Docker CE use overlay2 storage by default. To use Aufs storage, we have to install linux-image-extra package for ubuntu 16.04.

Now, to add repo from Docker official repository we need to first add key as,

Proceeding with addition of repository,

Now, we have added docker repository. We need to update it before beginning docker installation.

Check if docker server is running and restart if its not up.

Check the docker details (storage driver as well) by,

 

Docker has  been installed with Aufs storage driver. We will discuss further regarding changing storage driver without reinstalling the Docker in our later blogs.

 

. . .

Comment

Add Your Comment

Be the first to comment.

css.php