{"id":56867,"date":"2020-06-30T12:04:39","date_gmt":"2020-06-30T16:04:39","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/?p=56867"},"modified":"2024-03-22T14:20:58","modified_gmt":"2024-03-22T18:20:58","slug":"how-to-install-docker-on-centos-7","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/","title":{"rendered":"How to Install Docker on CentOS 7"},"content":{"rendered":"\n<p><strong>Docker<\/strong> is a popular open-source tool used to create, deploy, and run applications by using <strong>containers<\/strong>. These containers are isolated, discrete packages that contain all of the software and configuration files necessary to run specific applications. In this article, we will outline some reasons why you might want to use Docker as well as the steps involved in the installation of the <strong>Docker Engine<\/strong> software on CentOS 7. Please note that in order to perform the steps in this task, you will need <a rel=\"noreferrer noopener\" href=\"https:\/\/www.inmotionhosting.com\/support\/amp\/obtain-root-access\/\" target=\"_blank\">root SSH access<\/a>.&nbsp;<\/p>\n\n\n\n<p>Topics Include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#why\">Why Use Docker?<\/a><\/li>\n\n\n\n<li><a href=\"#repo\">Installing Docker via Repo<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"alert alert-danger\"><strong>Note: <\/strong>You will need a <a href=\"https:\/\/www.inmotionhosting.com\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\">VPS Hosting <\/a>or <a href=\"https:\/\/www.inmotionhosting.com\/dedicated-servers\" target=\"_blank\" rel=\"noreferrer noopener\">Dedicated Hosting<\/a> plan to install Docker and set up your containers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"why\">Why Use Docker?&nbsp;<\/h2>\n\n\n\n<p>Docker allows you to run multiple applications on a server without worrying about them interfering with each other. It also provides a layer of security, ensuring that an individual vulnerable application does not compromise your entire server. Additionally, by leveraging the existence of pre-made Docker containers, you can quickly install a wide variety of software images in relatively short order. As Docker containers use fewer system resources than a standard <strong>Virtual Machine (VM)<\/strong>, you can run multiple applications without the heavy resource overhead traditionally associated with containerized applications. Furthermore, you can use the containers to more easily manage different software environments for your various development and production-related tasks.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"repo\">Installing Docker via Repo<\/h2>\n\n\n\n<p>One of the ways to install Docker on your server is by using the <strong>Docker repository (repo)<\/strong> that can be downloaded from the official Docker servers.<\/p>\n\n\n\n<ol class=\"article_list wp-block-list\">\n<li>First, you will need to install the \u201cyum-utils\u201d package using the following command:<br><br><pre>sudo yum install -y yum-utils<\/pre><\/li>\n\n\n\n<li>Then, use the yum-config-manager that was just installed in step 1 to add a stable repository:&nbsp;<br><br><pre>sudo yum-config-manager \\<\/pre><br><pre>--add-repo \\<br>https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo<\/pre><\/li>\n\n\n\n<li>Use the following command to install the latest version of docker and containerd: <br><br><pre>sudo yum install docker-ce docker-ce-cli containerd.io<\/pre><\/li>\n\n\n\n<li>Next, start Docker using the following command:<br><br><pre>sudo systemctl start docker<\/pre><\/li>\n\n\n\n<li>Finally, test your Docker install with \u201chello world\u201d<br><br><pre>sudo docker run hello-world<\/pre><\/li>\n<\/ol>\n\n\n\n<p>Congratulations, you have successfully installed Docker!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Docker is a popular open-source tool used to create, deploy, and run applications by using containers. These containers are isolated, discrete packages that contain all of the software and configuration files necessary to run specific applications. In this article, we will outline some reasons why you might want to use Docker as well as the<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/\"> Read More ><\/a><\/p>\n","protected":false},"author":57014,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4360],"tags":[],"class_list":["post-56867","post","type-post","status-publish","format-standard","hentry","category-software"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install Docker on CentOS 7 | InMotion Hosting Support Center<\/title>\n<meta name=\"description\" content=\"In this article, we will outline why you might want to use Docker as well as the steps involved in the installation of Docker on CentOS 7.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Docker on CentOS 7 | InMotion Hosting Support Center\" \/>\n<meta property=\"og:description\" content=\"In this article, we will outline why you might want to use Docker as well as the steps involved in the installation of Docker on CentOS 7.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-30T16:04:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-22T18:20:58+00:00\" \/>\n<meta name=\"author\" content=\"InMotion Hosting Contributor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InMotion Hosting Contributor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/\"},\"author\":{\"name\":\"InMotion Hosting Contributor\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\"},\"headline\":\"How to Install Docker on CentOS 7\",\"datePublished\":\"2020-06-30T16:04:39+00:00\",\"dateModified\":\"2024-03-22T18:20:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/\"},\"wordCount\":325,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"Software\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/\",\"name\":\"How to Install Docker on CentOS 7 | InMotion Hosting Support Center\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2020-06-30T16:04:39+00:00\",\"dateModified\":\"2024-03-22T18:20:58+00:00\",\"description\":\"In this article, we will outline why you might want to use Docker as well as the steps involved in the installation of Docker on CentOS 7.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Docker on CentOS 7\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\",\"name\":\"InMotion Hosting Contributor\",\"description\":\"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!\",\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/inmotion-hosting\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Docker on CentOS 7 | InMotion Hosting Support Center","description":"In this article, we will outline why you might want to use Docker as well as the steps involved in the installation of Docker on CentOS 7.","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:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Docker on CentOS 7 | InMotion Hosting Support Center","og_description":"In this article, we will outline why you might want to use Docker as well as the steps involved in the installation of Docker on CentOS 7.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2020-06-30T16:04:39+00:00","article_modified_time":"2024-03-22T18:20:58+00:00","author":"InMotion Hosting Contributor","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"InMotion Hosting Contributor","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/"},"author":{"name":"InMotion Hosting Contributor","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644"},"headline":"How to Install Docker on CentOS 7","datePublished":"2020-06-30T16:04:39+00:00","dateModified":"2024-03-22T18:20:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/"},"wordCount":325,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["Software"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/","name":"How to Install Docker on CentOS 7 | InMotion Hosting Support Center","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2020-06-30T16:04:39+00:00","dateModified":"2024-03-22T18:20:58+00:00","description":"In this article, we will outline why you might want to use Docker as well as the steps involved in the installation of Docker on CentOS 7.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/how-to-install-docker-on-centos-7\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Install Docker on CentOS 7"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644","name":"InMotion Hosting Contributor","description":"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!","sameAs":["https:\/\/www.linkedin.com\/company\/inmotion-hosting\/","https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":{"id":4360,"name":"Software","slug":"software","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/56867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/57014"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=56867"}],"version-history":[{"count":13,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/56867\/revisions"}],"predecessor-version":[{"id":122461,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/56867\/revisions\/122461"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=56867"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=56867"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=56867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}