{"id":7151,"date":"2017-12-04T08:59:42","date_gmt":"2017-12-04T00:59:42","guid":{"rendered":"http:\/\/rmohan.com\/?p=7151"},"modified":"2017-12-04T08:59:42","modified_gmt":"2017-12-04T00:59:42","slug":"docker-centos7","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=7151","title":{"rendered":"Docker centos7"},"content":{"rendered":"<h1><a id=\"Introduction_0\"><\/a>Introduction<\/h1>\n<p>In previous posts we have seen the installation and working of Docker. This post will explain the installation of the Docker Community Edition (CE) on CentOS. If you are looking for the Ubuntu installation you should check our <a href=\"https:\/\/www.voyalab.com\/2017\/04\/01\/installing-docker-community-edition-on-ubuntu\/\">this<\/a> post.<\/p>\n<p>&nbsp;<\/p>\n<h1><a id=\"Step_1__Remove_Old_Versions_5\"><\/a>Step 1 | Remove Old Versions<\/h1>\n<pre><code class=\"language-sh\">$ sudo yum remove docker docker-common docker-selinux docker-engine\r\n<\/code><\/pre>\n<h1><a id=\"Step_2__Install_Required_Packages_9\"><\/a>Step 2 | Install Required Packages<\/h1>\n<pre><code class=\"language-sh\">$ sudo yum install -y yum-utils device-mapper-persistent-data lvm2\r\n<\/code><\/pre>\n<h1><a id=\"Step_3__Setup_the_Docker_CE_Repository_13\"><\/a>Step 3 | Setup the Docker CE Repository<\/h1>\n<pre><code class=\"language-sh\">$ sudo yum-config-manager --add-repo <a class=\"vglnk\" href=\"https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo\" rel=\"nofollow\">https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo<\/a>\r\n<\/code><\/pre>\n<h1><a id=\"Step_4__Update_the_Packages_18\"><\/a>Step 4 | Update the Packages<\/h1>\n<pre><code class=\"language-sh\">$ sudo yum update\r\n<\/code><\/pre>\n<h1><a id=\"Step_5_Install_specific_version_Production_recommended_23\"><\/a>Step 5 |Install specific version (Production recommended)<\/h1>\n<pre><code class=\"language-sh\">$ sudo yum list docker-ce.x86_64  --showduplicates | sort -r\r\n\r\nLoaded plugins: amazon-id, rhui-lb, search-disabled-repos\r\ndocker-ce.x86_64            <span class=\"hljs-number\">17.06<\/span>.<span class=\"hljs-number\">0<\/span>.ce-<span class=\"hljs-number\">1<\/span>.el7.centos             docker-ce-stable\r\ndocker-ce.x86_64            <span class=\"hljs-number\">17.03<\/span>.<span class=\"hljs-number\">2<\/span>.ce-<span class=\"hljs-number\">1<\/span>.el7.centos             docker-ce-stable\r\ndocker-ce.x86_64            <span class=\"hljs-number\">17.03<\/span>.<span class=\"hljs-number\">1<\/span>.ce-<span class=\"hljs-number\">1<\/span>.el7.centos             docker-ce-stable\r\ndocker-ce.x86_64            <span class=\"hljs-number\">17.03<\/span>.<span class=\"hljs-number\">0<\/span>.ce-<span class=\"hljs-number\">1<\/span>.el7.centos             docker-ce-stable\r\nAvailable Packages\r\n\r\n<\/code><\/pre>\n<pre><code class=\"language-sh\">$ sudo yum install docker-ce-&lt;VERSION&gt;\r\n<\/code><\/pre>\n<h1><a id=\"Step_6__Install_through_respository_38\"><\/a>Step 6 | Install through respository<\/h1>\n<pre><code class=\"language-sh\">$ sudo yum install docker-ce\r\n<\/code><\/pre>\n<h1><a id=\"Step_7__Start_Docker_42\"><\/a>Step 7 | Start Docker<\/h1>\n<pre><code class=\"language-sh\">$ sudo systemctl start docker\r\n<\/code><\/pre>\n<h1><a id=\"Step_8__Verify_the_Installation_46\"><\/a>Step 8 | Verify the Installation<\/h1>\n<pre><code class=\"language-sh\">$ sudo docker run hello-world\r\n<\/code><\/pre>\n<p>This will install the Docker on CentOS.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction <\/p>\n<p>In previous posts we have seen the installation and working of Docker. This post will explain the installation of the Docker Community Edition (CE) on CentOS. If you are looking for the Ubuntu installation you should check our this post.<\/p>\n<p>&nbsp;<\/p>\n<p> Step 1 | Remove Old Versions $ sudo yum remove docker docker-common docker-selinux [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[82],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7151"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7151"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7151\/revisions"}],"predecessor-version":[{"id":7153,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/7151\/revisions\/7153"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}