My Board
How to Install Docker on CentOS 7 - Printable Version

+- My Board (https://ellohost.com/forum)
+-- Forum: Tutoriel EN (https://ellohost.com/forum/forumdisplay.php?fid=8)
+--- Forum: Others (https://ellohost.com/forum/forumdisplay.php?fid=20)
+--- Thread: How to Install Docker on CentOS 7 (/showthread.php?tid=731)



How to Install Docker on CentOS 7 - aaron - 09-08-2023


    How to Install Docker on CentOS 7
   

How to Install Docker on CentOS 7


   

Installing Docker on CentOS 7 is simple. To do this, it is necessary to connect to our server using SSH:

   
ssh your-user@your-server
   

Then, we have to install a series of packages prior to installing Docker. We need to be the root user and run the following line in the command line:

   
yum install -y yum-utils device-mapper-persistent-data lvm2
   

The easiest and safest way to complete the process is through Docker’s official repositories. To do this, it is necessary to execute this line:

   
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
   

After that, we can install Docker on CentOS 7 by running the following command:

   
yum install docker-ce
   

We now know how to install Docker on CentOS. But it’s not running yet! To enable and start docker, execute the following commands:

   
systemctl enable docker
   
systemctl start docker
   

Finally, we can check the status of the service to check that everything has gone well:

   
systemctl status docker
   

In the output, we should see a green line indicating that Docker is up and running.