---
title: 'How to Install Docker on Centos 7 | Zomro'
description: 'Docker application makes it easy to manage site/application processes in isolated containers. In this article we will tell you how to install Docker on Centos 7'
image: 'https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/another/2022/11/01/1669736570_1.png'
---

![opened image]()

  * [Zomro](https://zomro.com/)
  * [FAQ](https://zomro.com/blog/faq/)
  * How to Install Docker on Centos 7 



# How to Install Docker on Centos 7

12-11-2022

A Docker app makes it easy to run/process manage sites/applications in isolated areas/containers.  
  
In containers, it is possible to run applications with resources isolated from the common system. Docker is very similar to a virtual machine like VirtualBox, but much more portable and resource efficient.  
  
OS packages need to be updated before installing Docker.  

    
    
    yum check-update
    

  
Download the required package and install:
    
    
    curl -fsSL https://get.docker.com/ | sh
    

  
Check the Docker version:
    
    
    docker --version
    

  
![How to Install Docker on Centos 7 - 1](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/another/2022/11/01/1669736570_1.png)  
Let's check the status of Docker:
    
    
    systemctl status docker
    

  
  
![How to Install Docker on Centos 7 - 2](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/another/2022/11/01/1669736593_2.png)  
If it does not start, then run:
    
    
    systemctl start docker
    

  
And add to autorun.
    
    
    systemctl enable docker
    

  
![How to Install Docker on Centos 7 - 3](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/another/2022/11/01/1669736594_4.png)  
In order to test in real conditions whether it is possible to access from Docker Hub and download a test container, run the following command:
    
    
    docker run hello world
    

  
  
If Docker is working properly, you should be able to observe this output:  
  
![How to Install Docker on Centos 7 - 4](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/another/2022/11/01/1669736583_5.png)  
  
The docker command is only run as root by default, or as a user in the docker group (the group is created automatically when docker is installed).  
Therefore, if you run the docker command without superuser (root) rights, you will get an error.  
  
In order not to use the sudo prefix each time, let's add the username from which we "sit" the docker group.
    
    
    sudo usermod -aG docker $(whoami)
    

  
Apply the added rule without restarting the server:
    
    
    sudo usermod -aG docker username
    

  
Where: username - the user in which you work. Enter the password on behalf of this user.  
  
Now we can enter the docker command without root privileges.  
  
To view all active/running containers, use the following command line:
    
    
    docker ps
    

  
![How to Install Docker on Centos 7 - 5](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/another/2022/11/01/1669736677_7.png)  
As you can see, no container is running. But we just downloaded and ran the hello-word test container! This container is no longer running, but still present in our system.  
  
To see it, use the following command line:
    
    
    docker ps -a
    

  
![How to Install Docker on Centos 7 - 6](https://dx86q6oq7ry0e.cloudfront.net/uploads/media/blog/another/2022/11/01/1669736704_8.png)  
As you can see, our hello-word container is loaded but not started.  
  
And so, in this article, we looked at how easy it is to install Docker and run a test container.  
  
You can learn how to install the services you need in Docker containers from the following articles.

Similar articles:

[How to install ISPmanager on Cloud VPS](https://zomro.com/blog/faq/598-how-to-install-ispmanager-on-cloudvps) [Installing the VestaCP panel](https://zomro.com/blog/faq/327-ustanovka-paneli-vestacp) [How to Install Node.js on Windows Server 2019](https://zomro.com/blog/faq/312-kak-ustanovit-nodejs-na-windows-server-2012-2016-2019) [How to install the FileGator file manager on Centos 7. (Apache-Nginx)](https://zomro.com/blog/faq/380-how-to-install-the-filegator-file-manager-on-centos-7-apache-nginx) [How to connect to a Docker container via sFTP](https://zomro.com/blog/faq/306-how-to-connect-to-a-docker-container-via-sftp)

[ Premium Cloud VPS from €7.95/mon ](/vps)
