Install Docker Engine on CentOS Linux

To implement available 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 install 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 repositories

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

Install using the repository

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

 #  install -y yum-utils 
Installing -utils

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

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

Step to Install Docker Engine

  1. To Install the latest version and containerd use below command
   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.