Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Install Docker on CentOS 7
#1

    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.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)