{"id":4991,"date":"2021-03-11T02:28:26","date_gmt":"2021-03-11T02:28:26","guid":{"rendered":"https:\/\/linuxways.net\/?p=4991"},"modified":"2021-03-13T06:05:33","modified_gmt":"2021-03-13T06:05:33","slug":"how-to-install-docker-ce-on-centos-8","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/centos\/how-to-install-docker-ce-on-centos-8\/","title":{"rendered":"How to Install Docker CE on CentOS 8"},"content":{"rendered":"<p>Docker is an open-source daemon-based container engine that allows us to create and deploy all applications inside containers. These containers are standardized environments that replicate independently from the host system. In CentOS 8 the Docker CE packages are not available. However, by adding an external repository, you can easily install Docker on the CentOS system.<\/p>\n<p>In the latest release of CentOS 8,\u00a0 docker has been replaced with other packages such as buildah and podman. So, if you don\u2019t wish to use podman packages then, remove them and install docker containers on your system. We will show you in this article, how to install Docker CE on CentOS 8 system through the command line.<\/p>\n<h2><strong>Prerequisites<\/strong><\/h2>\n<p>All administrative commands must run a sudo or root user.<\/p>\n<p>Open the terminal window from your desktop \u2018activities\u2019 menu and perform the following various steps to install the Docker CE on CentOS 8 system:<\/p>\n<h2><strong>Step 1: Add Docker CE Repository<\/strong><\/h2>\n<p>It is important to note that Docker CE packages are not available in the CentOS 8 repository. Therefore, use the following command to add the docker-ce repository to your CentOS system and enable it:<\/p>\n<pre>\r\n$ dnf config-manager --add-repo=https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo\r\n<\/pre>\n<p>Once the docker-ce repository is enabled on your system, the following result shows on the terminal:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1093\" height=\"181\" class=\"wp-image-4992\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-106.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-106.png 1093w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-106-300x50.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-106-1024x170.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-106-768x127.png 768w\" sizes=\"auto, (max-width: 1093px) 100vw, 1093px\" \/><\/p>\n<h2><strong>Step 2: Install Docker CE<\/strong><\/h2>\n<p>After successfully adding the docker CE repository, check the available docker version for installation by using the following command:<\/p>\n<pre>\r\n$ dnf list docker-ce\r\n<\/pre>\n<p>As you can see from the following screenshot, docker-ce is available for installation:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1194\" height=\"183\" class=\"wp-image-4993\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-107.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-107.png 1194w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-107-300x46.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-107-1024x157.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-107-768x118.png 768w\" sizes=\"auto, (max-width: 1194px) 100vw, 1194px\" \/><\/p>\n<p>Now, install the Docker CE by running the below-mentioned command:<\/p>\n<pre>\r\n$ sudo dnf install docker-ce --nobest -y\r\n<\/pre>\n<p>If podman or other dependent packages are available in your system then, use the below-given command that will first erase those packages:<\/p>\n<pre>\r\n$ sudo dnf install docker-ce \u2013allowerasing\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1198\" height=\"764\" class=\"wp-image-4994\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-108.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-108.png 1198w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-108-300x191.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-108-1024x653.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-108-768x490.png 768w\" sizes=\"auto, (max-width: 1198px) 100vw, 1198px\" \/><\/p>\n<p>Confirm the installation process by pressing the \u2018y\u2019 and then hit the \u2018Enter\u2019 key. After that, the gpg imports on your system again press \u2018y\u2019 to confirm the installation process as follows:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1197\" height=\"750\" class=\"wp-image-4995\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-109.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-109.png 1197w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-109-300x188.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-109-1024x642.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-109-768x481.png 768w\" sizes=\"auto, (max-width: 1197px) 100vw, 1197px\" \/><\/p>\n<h2><strong>Step 3: Enable Docker CE services<\/strong><\/h2>\n<p>Now, by using the following commands start the docker services on your system:<\/p>\n<pre>\r\n$ systemctl start docker\r\n\r\n$ systemctl enable docker\r\n\r\n$ systemctl status docker\r\n<\/pre>\n<p>Docker services are started and enabled on your system which is shown in the following screenshot:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1199\" height=\"756\" class=\"wp-image-4996\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-110.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-110.png 1199w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-110-300x189.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-110-1024x646.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-110-768x484.png 768w\" sizes=\"auto, (max-width: 1199px) 100vw, 1199px\" \/><\/p>\n<p>Check the installed Docker CE version by executing the following command:<\/p>\n<pre>\r\n$ docker --version\r\n<\/pre>\n<p>The latest version 20.10.5 is installed on your system now which you can see in the following screenshot:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"949\" height=\"82\" class=\"wp-image-4997\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-111.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-111.png 949w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-111-300x26.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-111-768x66.png 768w\" sizes=\"auto, (max-width: 949px) 100vw, 949px\" \/><\/p>\n<h2><strong>Step 4: Test the Docker CE installation<\/strong><\/h2>\n<p>To check whether the Docker CE is working correctly or not on your system. Run the following hello-world Docker container command:<\/p>\n<pre>\r\n$ sudo docker run hello-world\r\n<\/pre>\n<p>The following message should display on the terminal after executing the above command:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1193\" height=\"727\" class=\"wp-image-4998\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-112.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-112.png 1193w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-112-300x183.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-112-1024x624.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-112-768x468.png 768w\" sizes=\"auto, (max-width: 1193px) 100vw, 1193px\" \/><\/p>\n<p>The docker images can be listed by running the following command:<\/p>\n<pre>\r\n$ sudo docker images\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1072\" height=\"138\" class=\"wp-image-4999\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-113.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-113.png 1072w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-113-300x39.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-113-1024x132.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/03\/word-image-113-768x99.png 768w\" sizes=\"auto, (max-width: 1072px) 100vw, 1072px\" \/><\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>That\u2019s all about the Docker installation tutorial. We have installed Docker CE on the CentOS 8 system in this article. I hope the above-mentioned steps will help you in the installation Please share your queries through comments in the comments box.<\/p>","protected":false},"excerpt":{"rendered":"<p>Docker is an open-source daemon-based container engine that allows us to create and deploy all applications inside containers. These containers are standardized environments that replicate independently from the&hellip;<\/p>","protected":false},"author":1,"featured_media":5013,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[93,217],"class_list":["post-4991","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","tag-centos-8","tag-docker-ce"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/4991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=4991"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/4991\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/5013"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=4991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=4991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=4991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}