To implement available container for deployment docker is one of the most important utility. Hub provides a large number of containers developed by the community. It work 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 Engine can be installed through different method . One of the important method is add , setup yum repository and install package from their . Another method is RPM package and script method . Here we will use ease method for install and upgrade tasks.
Install using the yum repository
Before setup yum repository we needed config manager utility to add repository , so
yum-utils package will be installed. Below command will install that package.
# yum install -y yum-utils
After the installation add yum repository to configure docker-ce.repo .Use 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.
<pre class="codeStyle"> systemctl start docker </pre> <pre class="codeStyle"> systemctl enable docker </pre> <pre class="codeStyle"> systemctl status docker </pre>
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.