Installing Docker on CentOS 7 With Yum

Step 1: Update Docker Package Database

In a terminal window, type:

sudo yum check-update

Step 2: Install the Dependencies

Type in the following command:

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

Step 3: Add the Docker Repository to CentOS

To install the edge or test versions of Docker, you need to add the Docker CE stable repository to your system. To do so, run the command:

sudo yum-config-manager --add-repo

Step 4: Install Docker On CentOS Using Yum

With everything set, you can finally move on to installing Docker on CentOS 7 by running:

sudo yum install docker

Step: 5 Manage Docker Service

Although you have installed Docker on CentOS, the service is still not running. To start the service, enable it to run at startup. Run the following commands in the order listed below. Start Docker:

sudo systemctl start docker

(Visited 64 times, 1 visits today)

Leave a comment

Your email address will not be published. Required fields are marked *