{"id":218,"date":"2023-07-21T20:21:44","date_gmt":"2023-07-21T18:21:44","guid":{"rendered":"https:\/\/extendsclass.com\/blog\/?p=218"},"modified":"2023-06-17T23:08:44","modified_gmt":"2023-06-17T21:08:44","slug":"installing-docker-on-linux","status":"publish","type":"post","link":"https:\/\/extendsclass.com\/blog\/installing-docker-on-linux","title":{"rendered":"Installing Docker on Linux"},"content":{"rendered":"\n<p>Welcome to the first article in a series about Docker. I recently discovered Docker, and I&#8217;m already impressed. I was fortunate enough to attend a Docker training as part of my job.<\/p>\n\n\n\n<p>To start, let&#8217;s learn how to install Docker on different GNU\/Linux distributions:<\/p>\n\n\n\n<p><strong>Ubuntu Debian CentOS<\/strong><\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_47_1 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"ez-toc-toggle-icon-1\"><label for=\"item-69daafdb15239\" aria-label=\"Table of Content\"><span style=\"display: flex;align-items: center;width: 35px;height: 30px;justify-content: center;direction:ltr;\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/label><input  type=\"checkbox\" id=\"item-69daafdb15239\"><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/extendsclass.com\/blog\/installing-docker-on-linux\/#Preamble\" title=\"Preamble\">Preamble<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/extendsclass.com\/blog\/installing-docker-on-linux\/#Installing_Docker_on_Ubuntu\" title=\"Installing Docker on Ubuntu\">Installing Docker on Ubuntu<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/extendsclass.com\/blog\/installing-docker-on-linux\/#Installing_Docker_on_Debian\" title=\"Installing Docker on Debian\">Installing Docker on Debian<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/extendsclass.com\/blog\/installing-docker-on-linux\/#Installing_Docker_on_CentOs\" title=\"Installing Docker on CentOs\">Installing Docker on CentOs<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Preamble\"><\/span>Preamble<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Docker revolutionizes the way we build, ship, and run applications by providing a lightweight and efficient containerization platform. With Docker, you can package your application and its dependencies into a self-contained unit called a container, ensuring consistency across different environments. This eliminates the &#8220;it works on my machine&#8221; problem and simplifies application deployment and management. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Installing_Docker_on_Ubuntu\"><\/span>Installing Docker on Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Start by updating the package list\nsudo apt-get update\n\n\/\/ Install Docker\nsudo apt install docker.io\n\n\/\/ Start the Docker service\nsudo systemctl start docker\n\n\/\/ Finally, enable the Docker service on startup\nsudo systemctl enable docker<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Installing_Docker_on_Debian\"><\/span>Installing Docker on Debian<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Start by updating the package list\nsudo apt update\n\n\/\/ Install necessary packages for APT to retrieve Docker\ndocker\nsudo apt install apt-transport-https ca-certificates curl gnupg2-agent software-properties-common\n\n\/\/ Add the GPG key for the official Docker repository\ncurl -fsSL https:\/\/download.docker.com\/linux\/debian\/gpg | apt-key add -\n\n\/\/ Add the Docker repository to APT sources\nsudo add-apt-repository \"deb &#91;arch=amd64] https:\/\/download.docker.com\/linux\/debian $(lsb_release -cs) stable\"\n\n\/\/ Update the package list again\nsudo apt update\n\n\/\/ Install Docker (and optionally containerd)\nsudo apt install docker-ce docker-ce-cli containerd.io\n\n\/\/ Start Docker service\nsudo service docker start<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Installing_Docker_on_CentOs\"><\/span>Installing Docker on CentOs<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Install yum-utils and add the Docker repository\nsudo yum install -y yum-utils\nsudo yum-config-manager --add-repo https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo\n\n\/\/ Install Docker (and optionally containerd)\nsudo yum install docker-ce docker-ce-cli containerd.io\n\n\/\/ Start Docker\nsudo systemctl start docker\n\n\/\/ Finally, enable the Docker service on startup\nsudo systemctl enable docker<\/code><\/pre>\n\n\n\n<p>If you encounter any issues, the official documentation is available: <a href=\"https:\/\/docs.docker.com\/engine\/install\/\" title=\"\">Docker Installation Docs<\/a>.<\/p>\n\n\n\n<p>If you want to test Docker without installing anything, it&#8217;s possible! Visit <a href=\"https:\/\/labs.play-with-docker.com\/\">https:\/\/labs.play-with-docker.com\/<\/a>. It&#8217;s a playground that provides a Linux environment with Docker already installed and pre-configured.<\/p>\n\n\n\n<p>And there you have it, you have <strong>successfully installed Docker<\/strong>!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to the first article in a series about Docker. I recently discovered Docker, and I&#8217;m already impressed. I was fortunate enough to attend a Docker training as part of my job. To start, let&#8217;s learn how to install Docker on different GNU\/Linux distributions: Ubuntu Debian CentOS Preamble Docker revolutionizes the way we build, ship, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":226,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":""},"categories":[2],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/posts\/218"}],"collection":[{"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/comments?post=218"}],"version-history":[{"count":6,"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/posts\/218\/revisions"}],"predecessor-version":[{"id":220,"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/posts\/218\/revisions\/220"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/media\/226"}],"wp:attachment":[{"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/media?parent=218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/categories?post=218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/tags?post=218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}