Install Docker CE on CentOS 8 - Step by Step Process ?

Docker is an open-source daemon-based container engine that allows us to create and deploy all applications inside containers.

These containers are standardized environments that replicate independently from the host system.
Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related Docker queries.
In CentOS 8 the Docker CE packages are not available.
However, by adding an external repository, you can easily install Docker on the CentOS system.
In the latest release of CentOS 8,  docker has been replaced with other packages such as buildah and podman.
So, if you don't wish to use podman packages then, remove them and install docker containers on your system.
In this context, we shall look into how to install Docker CE on CentOS 8 system through the command line.

Steps to install Docker CE on CentOS system:

Before performing this installation process, ensure that All administrative commands must run a sudo or root user.
Then, Open the terminal window from your desktop ‘activities’ menu and perform the following various steps to install the Docker CE on CentOS 8 system.

1. Add Docker CE Repository

It is important to note that Docker CE packages are not available in the CentOS 8 repository. Therefore, use the following command to add the docker-ce repository to your CentOS system and enable it:

$ dnf config-manager --add-repo=

This will enable docker-ce repository on your system.

2. Install Docker CE

After successfully adding the docker CE repository, check the available docker version for installation by using the following command:

$ dnf list docker-ce

You will see that docker-ce is available for installation.
Now, install the Docker CE by running the below-mentioned command:

$ sudo dnf install docker-ce --nobest -y

If podman or other dependent packages are available in your system then, use the below-given command that will first erase those packages:

$ sudo dnf install docker-ce –allowerasing

Confirm the installation process by pressing the 'y' and then hit the 'Enter' key.
After that, the gpg imports on your system again press 'y' to confirm the installation process.

3. Enable Docker CE services

Now, by using the following commands start the docker services on your system:

$ systemctl start docker
$ systemctl enable docker
$ systemctl status docker

Docker services are started and enabled on your system.
You can Check the installed Docker CE version by executing the following command:

$ docker --version

4. Test the Docker CE installation

To check whether the Docker CE is working correctly or not on your system.
Run the following hello-world Docker container command:

$ sudo docker run hello-world

The docker images can be listed by running the following command:

$ sudo docker images

[Need urgent assistance in fixing Docker related issues ? We can help you. ]

This article covers how to perform Docker installation and Configuration. Also, you will learn how to install Docker CE on the CentOS 8 system. Docker container technology allows you to run applications in a specific and isolated environment.

Docker Community Edition (CE) is the new name for the free Docker product.

To Install Docker CE on Linux:
1. Remove all existing docker applications (that might currently be installed) in order to make sure we are using a clean installation.:

# yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine

2. Add an external repository that will help us obtain the Docker software:

# dnf config-manager --add-repo=

3. Check what versions of docker we have in the repository:

# dnf list docker-ce

4. Install the version that best matches our CentOS server version:

# dnf install docker-ce --nobest

5. We can double-check if the installation was successful by using the version command:

# docker -v

Related Posts