How To Install Docker On CentOS 8/RHEL 8

Docker is a tool that allows you to easily build, test and deploy applications smoothly and quickly using containers. It has gained widespread popularity in recent times due to the portability to run applications anywhere irrespective of the host operating system. Docker provides a more efficient and lightweight environment to deploy the application. All containers are run by a single operating system kernel and therefore use fewer resources than virtual machines.

In this post, we will learn how to install Docker on CentOS 8 / RHEL 8.

Install Docker On CentOS 8 / RHEL 8

  • Community Edition (CE)
  • Enterprise Edition (EE)

In this article, we will install the community edition.

let’s get started

Configure Docker Repository

Install Docker

yum install docker-ce --nobest

By using the — nobest option, changes the behavior of the yum package manager so it looks for the first version of docker-ce with satisfiable dependencies.

Start and enable Docker service

systemctl start docker

Docker service status

systemctl status docker


To get network Connectivity Inside the docker container run the following commands in the host operating system and restart the docker service.

firewall-cmd --zone=public --add-masquerade --permanent
firewall-cmd --zone=public --add-port=80/tcp
firewall-cmd --zone=public --add-port=443/tcp
firewall-cmd --reload
systemctl restart docker.

And we are done. congratulation we have successfully installed docker🤩.

Thank you for reading!!😇😇

Aspiring Cloud DevOps Engineer