Install Docker Engine on CentOS Linux

To implement available containers for deployment docker is one of the most important utilities. Hub provides a large number of containers developed by the community. It works as a service and uses a client-server architecture. Docker client CLI Tool is responsible for communicating with a server and Docker Server runs as a daemon on an operating system.

Prerequisites for Installation

To Docker Engine, you need a maintained version of CentOS 7 or 8. Archived versions aren’t supported or tested.

  • CentOs 7 or CentOs 8 Operating System
  • Centos-extras repository must be working
  • Storage Driver needed overlay2
  • sudo user administrative privilege or root user access
  • working yum repositories

Docker engines can be installed through a different method. One of the important methods is to add, set up the yum repository, and the package from there. Another method is the package and script method. Here we will use the ease method for installation and upgrade tasks.

using the

Before setup the we needed a config manager utility to add the repository, so the yum-utils package will be installed. The below command will that package.

 # yum install -y yum-utils 
Installing yum-utils

After the installation adds the to configure docker-ce. repo.Use the below command.

  # yum-config-manager --add-repo 
Adding docker-ce.repo

Step to Docker Engine

  1. To the latest version and containerd use below command
  yum install docker-ce docker-ce-cli  
Installing docker-ce docker-ce-cli

2. Start and Enable the container service.

# systemctl start docker 
 # systemctl enable docker
 # systemctl status docker 

Verify by running the hello-world container image

   # docker run hello-world 

The output of the above command will show text message of Hello from Docker ! confirm the installation is working correctly.

About Sachin Gupta

I am a professional freelance contributor and founder of tech transit. Love to write and lover of education, culture, and community. I have been using it, setting, supporting, and maintaining it since 2009.Linux rocks!

Have any Question or Comment?

Leave a Reply

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