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 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
- 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 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 yum repository
Before setup the yum 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.
# yum install -y yum-utils
After the installation adds the yum repository to configure docker-ce. repo.Use the below command.
# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Step to Install Docker Engine
- To Install the latest version and containerd use below command
yum install docker-ce docker-ce-cli containerd.io
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.