{"id":5290,"date":"2022-12-12T10:59:37","date_gmt":"2022-12-12T05:29:37","guid":{"rendered":"https:\/\/www.hostnamaste.com\/blog\/?p=5290"},"modified":"2023-11-30T12:16:09","modified_gmt":"2023-11-30T06:46:09","slug":"how-to-install-docker-on-centos-openvz-vps","status":"publish","type":"post","link":"https:\/\/www.hostnamaste.com\/blog\/how-to-install-docker-on-centos-openvz-vps\/","title":{"rendered":"How to Install Docker on CentOS OpenVZ VPS &#8211; HostNamaste"},"content":{"rendered":"<figure id=\"attachment_5314\" aria-describedby=\"caption-attachment-5314\" style=\"width: 957px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5314 size-full\" title=\"How to Install Docker on CentOS OpenVZ VPS - HostNamaste\" src=\"https:\/\/www.hostnamaste.com\/blog\/wp-content\/uploads\/2022\/12\/How-to-Install-Docker-on-CentOS-OpenVZ-VPS-HostNamaste.jpg\" alt=\"How to Install Docker on CentOS OpenVZ VPS - HostNamaste\" width=\"957\" height=\"487\" srcset=\"https:\/\/www.hostnamaste.com\/blog\/wp-content\/uploads\/2022\/12\/How-to-Install-Docker-on-CentOS-OpenVZ-VPS-HostNamaste.jpg 957w, https:\/\/www.hostnamaste.com\/blog\/wp-content\/uploads\/2022\/12\/How-to-Install-Docker-on-CentOS-OpenVZ-VPS-HostNamaste-300x153.jpg 300w, https:\/\/www.hostnamaste.com\/blog\/wp-content\/uploads\/2022\/12\/How-to-Install-Docker-on-CentOS-OpenVZ-VPS-HostNamaste-768x391.jpg 768w\" sizes=\"auto, (max-width: 957px) 100vw, 957px\" \/><figcaption id=\"caption-attachment-5314\" class=\"wp-caption-text\"><span style=\"color: #000000; font-size: 14pt; font-family: Verdana, Geneva;\"><strong>How to Install Docker on CentOS OpenVZ VPS &#8211; HostNamaste.com<\/strong><\/span><\/figcaption><\/figure>\n<p><span style=\"font-family: Verdana, Geneva;\"><strong><span style=\"font-size: 18pt;\">Introduction<\/span><\/strong><\/span><\/p>\n<p><span style=\"font-family: Verdana, Geneva; font-size: 14pt;\">The Docker is a very popular software package that creates and manages containers for application development services.<\/span><\/p>\n<p><span style=\"font-family: Verdana, Geneva; font-size: 14pt;\">The <span style=\"text-decoration: underline;\"><a href=\"https:\/\/www.docker.com\/\" target=\"_blank\" rel=\"noopener\"><strong>Docker<\/strong><\/a><\/span> platform creates a uniform interface so that almost all the applications running on it is compatible with the mentioned operating systems. Developing in Docker also speeds up applications, since it shares the kernel and other Linux resources.<\/span><\/p>\n<h2><span style=\"font-family: Verdana, Geneva;\"><strong><span style=\"font-size: 14pt;\">How to Install Docker on CentOS OpenVZ VPS &#8211; HostNamaste<\/span><\/strong><\/span><\/h2>\n<p><span style=\"font-family: Verdana, Geneva;\"><span style=\"font-size: 14pt;\">We are now installing Docker on CentOS 7 Linux \/ OpenVZ VPS using Yum:<\/span><\/span><\/p>\n<h3><span style=\"font-family: Verdana, Geneva;\"><strong>Prerequisites \/ System requirements:<\/strong><\/span><\/h3>\n<ul>\n<li><span style=\"font-family: Verdana, Geneva; font-size: 14pt;\"><span style=\"text-decoration: underline;\"><a href=\"https:\/\/www.hostnamaste.com\/openvz-vps.php\"><strong>OpenVZ 7 VPS<\/strong><\/a><\/span> as Docker is not working on OpenVZ 6. You can install it on <a href=\"https:\/\/www.hostnamaste.com\/kvm-vps.php\"><strong><span style=\"text-decoration: underline;\">KVM VPS<\/span><\/strong><\/a> as well, but here I am giving the guidance on <strong>OpenVZ 7 VPS.<\/strong><\/span><\/li>\n<li><span style=\"font-family: Verdana, Geneva; font-size: 14pt;\">RAM: Minimum 512MB RAM (2GB Recommended).<\/span><\/li>\n<li><span style=\"font-size: 14pt; font-family: Verdana, Geneva;\">Disk: Sufficient amount Disk Space to Run the Docker Containers you Wish to Use.<\/span><\/li>\n<li><span style=\"font-size: 14pt; font-family: Verdana, Geneva;\">CPU: It depends on the Applications you wish to Run in the Containers.<\/span><\/li>\n<li><span style=\"font-size: 14pt; font-family: Verdana, Geneva;\">OS: CentOS &#8211; Docker is also supported on Ubuntu, Debian, Fedora and Windows OS.<\/span><\/li>\n<li><span style=\"font-family: Verdana, Geneva; font-size: 14pt;\">A user account with root\/sudo privileges.<\/span><\/li>\n<li><span style=\"font-family: Verdana, Geneva; font-size: 14pt;\">Software package installer yum.<\/span><\/li>\n<\/ul>\n<h3><span style=\"font-family: Verdana, Geneva; font-size: 14pt;\"><strong>1) Update Docker Package Database<\/strong><\/span><\/h3>\n<pre><span style=\"font-size: 14pt; font-family: Verdana, Geneva; color: #ff6600;\"><strong>yum check-update<\/strong><\/span><\/pre>\n<h3><span style=\"font-family: Verdana, Geneva; font-size: 14pt;\"><strong>2) Install the Dependencies<\/strong><\/span><\/h3>\n<pre><span style=\"font-size: 14pt; font-family: Verdana, Geneva; color: #ff6600;\"><strong>yum install -y yum-utils device-mapper-persistent-data lvm2<\/strong><\/span><\/pre>\n<h3><span style=\"font-family: Verdana, Geneva; font-size: 14pt;\"><strong>3) Add the Docker Repository to CentOS<\/strong><\/span><\/h3>\n<pre><span style=\"font-size: 14pt; font-family: Verdana, Geneva; color: #ff6600;\"><strong>yum-config-manager --add-repo https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo<\/strong><\/span><\/pre>\n<h3><span style=\"font-family: Verdana, Geneva; font-size: 14pt;\"><strong>4) Install Docker On CentOS<\/strong><\/span><\/h3>\n<pre><span style=\"font-family: Verdana, Geneva; font-size: 14pt; color: #ff6600;\"><strong>yum install docker<\/strong><\/span><\/pre>\n<h3><span style=\"font-family: Verdana, Geneva; font-size: 14pt;\"><strong>5) Manage Docker Service<\/strong><\/span><\/h3>\n<h3><span style=\"font-size: 14pt; font-family: Verdana, Geneva;\"><strong>6) Start Docker<\/strong><\/span><\/h3>\n<pre><span style=\"font-size: 14pt; font-family: Verdana, Geneva; color: #ff6600;\"><strong>sudo systemctl start docker<\/strong><\/span><\/pre>\n<h3><span style=\"font-size: 14pt; font-family: Verdana, Geneva;\"><strong>7) Enable Docker<\/strong><\/span><\/h3>\n<pre class=\"wp-block-code copy-the-code-target\"><span style=\"color: #ff6600; font-family: Verdana, Geneva;\"><strong><span style=\"font-size: 14pt;\">systemctl enable docker<\/span><\/strong><\/span><\/pre>\n<h3><span style=\"font-size: 14pt; font-family: Verdana, Geneva;\"><strong>8) Check the Status of the Docker Service<\/strong><\/span><\/h3>\n<pre><span style=\"font-family: Verdana, Geneva;\"><strong><span style=\"color: #ff6600; font-size: 14pt;\">systemctl status docker<\/span><\/strong><\/span><\/pre>\n<h3><span style=\"font-size: 14pt; font-family: Verdana, Geneva;\"><strong>9) Test Docker<\/strong><\/span><\/h3>\n<pre><span style=\"font-family: Verdana, Geneva; font-size: 14pt; color: #ff6600;\"><strong>docker run hello-world<\/strong><\/span><\/pre>\n<h2><span style=\"font-size: 18pt; font-family: Verdana, Geneva;\"><strong>Conclusion<\/strong><\/span><\/h2>\n<p><span style=\"font-size: 14pt; font-family: Verdana, Geneva;\">If you followed this post properly, you should have successfully installed Docker on your CentOS OpenVZ VPS and now you can explore the wonderful world of the Docker :)<\/span><\/p>\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"How to Install Docker on CentOS OpenVZ VPS \u2013 HostNamaste.com\" width=\"758\" height=\"426\" src=\"https:\/\/www.youtube.com\/embed\/RWovcvYgde0\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n<p><\/span><\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction The Docker is a very popular software package that creates and manages containers for application development services. The Docker platform creates a uniform interface&hellip;<\/p>\n","protected":false},"author":2,"featured_media":5314,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3325,3327,3326,3328,2338],"tags":[2683,607,3329,292,1129,1130,2674,291,569],"class_list":["post-5290","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker","category-centos","category-how-to-install-docker","category-openvz-7-vps","category-openvz-vps","tag-centos","tag-docker","tag-how-to-install-docker","tag-kvm-vps","tag-openvz-6","tag-openvz-7","tag-openvz-7-vps","tag-openvz-vps","tag-vps"],"acf":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hostnamaste.com\/blog\/wp-json\/wp\/v2\/posts\/5290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostnamaste.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostnamaste.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostnamaste.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostnamaste.com\/blog\/wp-json\/wp\/v2\/comments?post=5290"}],"version-history":[{"count":25,"href":"https:\/\/www.hostnamaste.com\/blog\/wp-json\/wp\/v2\/posts\/5290\/revisions"}],"predecessor-version":[{"id":5320,"href":"https:\/\/www.hostnamaste.com\/blog\/wp-json\/wp\/v2\/posts\/5290\/revisions\/5320"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostnamaste.com\/blog\/wp-json\/wp\/v2\/media\/5314"}],"wp:attachment":[{"href":"https:\/\/www.hostnamaste.com\/blog\/wp-json\/wp\/v2\/media?parent=5290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostnamaste.com\/blog\/wp-json\/wp\/v2\/categories?post=5290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostnamaste.com\/blog\/wp-json\/wp\/v2\/tags?post=5290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}