{"id":3526,"date":"2017-11-23T13:29:48","date_gmt":"2017-11-23T13:29:48","guid":{"rendered":"https:\/\/cloudkul.com\/blog\/?p=3526"},"modified":"2017-11-23T14:57:32","modified_gmt":"2017-11-23T14:57:32","slug":"docker-installation-on-ubuntu-16-04-with-aufs-storage-driver","status":"publish","type":"post","link":"https:\/\/cloudkul.com\/blog\/docker-installation-on-ubuntu-16-04-with-aufs-storage-driver\/","title":{"rendered":"Docker Installation on Ubuntu 16.04 with Aufs Storage Driver"},"content":{"rendered":"<p>In our previous <a href=\"https:\/\/cloudkul.com\/blog\/magento-2-and-varnish-cache-integration-with-docker-compose\/\">blogs<\/a>, we have been busy in establishing various multi-tier docker architecture,<a href=\"https:\/\/cloudkul.com\/blog\/understanding-docker-images-and-containers\/\"> working around docker images and containers <\/a>and <a href=\"https:\/\/cloudkul.com\/blog\/understanding-communication-docker-containers\/\">understanding their communication<\/a>. 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.<\/p>\n<p>While working on Docker\u00a0 projects, we came across various challenges. As we can&#8217;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.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>Zombie Images and Container<\/strong><\/h2>\n<p>&nbsp;<\/p>\n<p>One of the frequent occurring\u00a0 problems that I came across is the <em>issues with Orphan (dead) image and containers<\/em>. Even lots pf people must have faced this issue that <em>Images and containers are still consuming Disk space even after containers are terminated, or images are removed. We call them to be <strong>zombie images and containers, still haunting us even after they are presumably gone.<\/strong><\/em><\/p>\n<p>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 <strong><em>\/var\/lib\/docker\/overlay2.\u00a0<\/em><\/strong><\/p>\n<p><strong>Overlay2 storage<\/strong> has been used as default storage driver now for Docker community edition, but earlier it was the <strong>aufs storage<\/strong> 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<em><strong> fresh installation of Docker community version on Ubuntu 16.04 with aufs storage.<\/strong><\/em><\/p>\n<p>&nbsp;<\/p>\n<h2><strong>Docker Installation on Ubuntu 16.04<\/strong><\/h2>\n<p>&nbsp;<\/p>\n<p>First of all, update and upgrade your Ubuntu 16.04 server as,<\/p>\n<pre class=\"lang:default decode:true\">apt-get update &amp;&amp; apt-get -y upgrade\r\n\r\n<\/pre>\n<p>As we have already discussed, Docker CE use overlay2 storage by default. <em><strong>To use Aufs storage, we have to install linux-image-extra package for ubuntu 16.04.<\/strong><\/em><\/p>\n<pre class=\"lang:default decode:true\">apt-get install linux-image-extra-`uname -r`\r\n\r\n<\/pre>\n<p>Now, to add repo from Docker official repository we need to first add key as,<\/p>\n<pre class=\"lang:default decode:true\">sudo apt-key adv --keyserver hkp:\/\/pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D\r\n\r\n<\/pre>\n<p>Proceeding with addition of repository,<\/p>\n<pre class=\"lang:default decode:true\">echo \"deb https:\/\/apt.dockerproject.org\/repo ubuntu-xenial main\" | sudo tee \/etc\/apt\/sources.list.d\/docker.list\r\n\r\n<\/pre>\n<p>Now, we have added docker repository. We need to update it before beginning docker installation.<\/p>\n<pre class=\"lang:default decode:true\">apt-get update\r\n\r\napt-get install docker-engine<\/pre>\n<p>Check if docker server is running and restart if its not up.<\/p>\n<pre class=\"lang:default decode:true\">\/etc\/init.d\/docker status\r\n\r\n\/etc\/init.d\/docker restart<\/pre>\n<p>Check the docker details (storage driver as well) by,<\/p>\n<pre class=\"lang:default decode:true \">docker info\r\n\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>Docker has\u00a0 been installed with Aufs storage driver. We will discuss further regarding changing storage driver without reinstalling the Docker in our later blogs.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our previous blogs, we have been busy in establishing various multi-tier docker architecture, working <a class=\"text-primary\" title=\"read more\" href=\"https:\/\/cloudkul.com\/blog\/docker-installation-on-ubuntu-16-04-with-aufs-storage-driver\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":7,"featured_media":3539,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[32,2,35,87,96,1,36],"tags":[191,192,189,5,190],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Docker Installation on Ubuntu 16.04 with Aufs Storage Driver - Cloudkul<\/title>\n<meta name=\"description\" content=\"One of the frequent occurring\u00a0 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. 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. Moving to Aufs storage curbed the orphan images and container problem. So we decided to write a blog on installation of Docker community version on Ubuntu 16.04 with aufs storage.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudkul.com\/blog\/docker-installation-on-ubuntu-16-04-with-aufs-storage-driver\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Docker Installation on Ubuntu 16.04 with Aufs Storage Driver - Cloudkul\" \/>\n<meta property=\"og:description\" content=\"One of the frequent occurring\u00a0 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. 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. Moving to Aufs storage curbed the orphan images and container problem. So we decided to write a blog on installation of Docker community version on Ubuntu 16.04 with aufs storage.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudkul.com\/blog\/docker-installation-on-ubuntu-16-04-with-aufs-storage-driver\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudkul\" \/>\n<meta property=\"article:published_time\" content=\"2017-11-23T13:29:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-11-23T14:57:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2017\/11\/download-6.png\" \/>\n\t<meta property=\"og:image:width\" content=\"848\" \/>\n\t<meta property=\"og:image:height\" content=\"422\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Alankrit Srivastava\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudkul.com\/blog\/docker-installation-on-ubuntu-16-04-with-aufs-storage-driver\/\",\"url\":\"https:\/\/cloudkul.com\/blog\/docker-installation-on-ubuntu-16-04-with-aufs-storage-driver\/\",\"name\":\"Docker Installation on Ubuntu 16.04 with Aufs Storage Driver - Cloudkul\",\"isPartOf\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\"},\"datePublished\":\"2017-11-23T13:29:48+00:00\",\"dateModified\":\"2017-11-23T14:57:32+00:00\",\"author\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/fc06bfd7f18d9a606dd94062d205af16\"},\"description\":\"One of the frequent occurring\u00a0 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. 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. Moving to Aufs storage curbed the orphan images and container problem. So we decided to write a blog on installation of Docker community version on Ubuntu 16.04 with aufs storage.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/docker-installation-on-ubuntu-16-04-with-aufs-storage-driver\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudkul.com\/blog\/docker-installation-on-ubuntu-16-04-with-aufs-storage-driver\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudkul.com\/blog\/docker-installation-on-ubuntu-16-04-with-aufs-storage-driver\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Docker Installation on Ubuntu 16.04 with Aufs Storage Driver\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\",\"url\":\"https:\/\/cloudkul.com\/blog\/\",\"name\":\"Cloudkul\",\"description\":\"Host your eCommerce Store on AWS with Optimized Performance\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudkul.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/fc06bfd7f18d9a606dd94062d205af16\",\"name\":\"Alankrit Srivastava\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/955c3dda2678272c436c5153832e401f?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/955c3dda2678272c436c5153832e401f?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"caption\":\"Alankrit Srivastava\"},\"description\":\"DevOps Manager at Webkul Software Privated Limited\",\"sameAs\":[\"http:\/\/cloudkul.com\"],\"url\":\"https:\/\/cloudkul.com\/blog\/author\/alankrit-srivastava256\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Docker Installation on Ubuntu 16.04 with Aufs Storage Driver - Cloudkul","description":"One of the frequent occurring\u00a0 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. 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. Moving to Aufs storage curbed the orphan images and container problem. So we decided to write a blog on installation of Docker community version on Ubuntu 16.04 with aufs storage.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudkul.com\/blog\/docker-installation-on-ubuntu-16-04-with-aufs-storage-driver\/","og_locale":"en_US","og_type":"article","og_title":"Docker Installation on Ubuntu 16.04 with Aufs Storage Driver - Cloudkul","og_description":"One of the frequent occurring\u00a0 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. 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. Moving to Aufs storage curbed the orphan images and container problem. So we decided to write a blog on installation of Docker community version on Ubuntu 16.04 with aufs storage.","og_url":"https:\/\/cloudkul.com\/blog\/docker-installation-on-ubuntu-16-04-with-aufs-storage-driver\/","og_site_name":"Cloudkul","article_published_time":"2017-11-23T13:29:48+00:00","article_modified_time":"2017-11-23T14:57:32+00:00","og_image":[{"width":848,"height":422,"url":"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2017\/11\/download-6.png","type":"image\/png"}],"author":"Alankrit Srivastava","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/cloudkul.com\/blog\/docker-installation-on-ubuntu-16-04-with-aufs-storage-driver\/","url":"https:\/\/cloudkul.com\/blog\/docker-installation-on-ubuntu-16-04-with-aufs-storage-driver\/","name":"Docker Installation on Ubuntu 16.04 with Aufs Storage Driver - Cloudkul","isPartOf":{"@id":"https:\/\/cloudkul.com\/blog\/#website"},"datePublished":"2017-11-23T13:29:48+00:00","dateModified":"2017-11-23T14:57:32+00:00","author":{"@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/fc06bfd7f18d9a606dd94062d205af16"},"description":"One of the frequent occurring\u00a0 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. 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. Moving to Aufs storage curbed the orphan images and container problem. So we decided to write a blog on installation of Docker community version on Ubuntu 16.04 with aufs storage.","breadcrumb":{"@id":"https:\/\/cloudkul.com\/blog\/docker-installation-on-ubuntu-16-04-with-aufs-storage-driver\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudkul.com\/blog\/docker-installation-on-ubuntu-16-04-with-aufs-storage-driver\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cloudkul.com\/blog\/docker-installation-on-ubuntu-16-04-with-aufs-storage-driver\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Docker Installation on Ubuntu 16.04 with Aufs Storage Driver"}]},{"@type":"WebSite","@id":"https:\/\/cloudkul.com\/blog\/#website","url":"https:\/\/cloudkul.com\/blog\/","name":"Cloudkul","description":"Host your eCommerce Store on AWS with Optimized Performance","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudkul.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/fc06bfd7f18d9a606dd94062d205af16","name":"Alankrit Srivastava","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/955c3dda2678272c436c5153832e401f?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/955c3dda2678272c436c5153832e401f?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","caption":"Alankrit Srivastava"},"description":"DevOps Manager at Webkul Software Privated Limited","sameAs":["http:\/\/cloudkul.com"],"url":"https:\/\/cloudkul.com\/blog\/author\/alankrit-srivastava256\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/3526"}],"collection":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/comments?post=3526"}],"version-history":[{"count":23,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/3526\/revisions"}],"predecessor-version":[{"id":3551,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/3526\/revisions\/3551"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/media\/3539"}],"wp:attachment":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/media?parent=3526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/categories?post=3526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/tags?post=3526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}