How to Install Docker on CentOS 8

Post-IBM acquisition Red Hat has crippled Docker on the inaugural release of CentOS 8, in a bid to force users to switch to podman (Pod Manager), the container engine backed by the company. Although the supporters of Podman argue that podman’s daemonless and rootless design make it more lightweight & secure than the Docker daemon, Podman has no orchestration features other than the ability to generate kubectl configuration files, which makes it a non-starter for Docker Compose and Swarm users.

A fresh install of CentOS 8 blocks the installation of the package through the package manager, which the docker-ce package is dependent on. You have to download & install manually from before installing docker-ce and docker-cli. Furthermore firewalld, the default firewall in CentOS 8, breaks DNS within containers when using the Docker Engine instead of Podman.

Here is how to work around the restrictions and install Docker on CentOS 8.

Install the dependencies and add the docker-ce repo.

sudo yum install -y yum-utils device-mapper-persistent-data lvm2

sudo yum-config-manager --add-repo

Download and install the package manually.

sudo yum install -y

If you don’t download & install the RPM manually, you will encounter errors similar to this when installing docker-ce and docker-cli. This is Red Hat blocking the installation of to discourage users from using the Docker Engine, and switch to Podman instead.

Problem: package docker-ce-3:19.03.2-3.el7.x86_64 requires containerd io >= 1.2.2-3, but none of the providers can be installed
– cannot install the best candidate for the job
– package is excluded
– package is excluded
– package is excluded
– package is excluded
– package is excluded

Install Docker CE from the docker-ce repository.

sudo yum install docker-ce docker-ce-cli

Enable and start the docker systemd service.

sudo systemctl enable docker

sudo systemctl start docker

sudo systemctl disable firewalld

If you don’t disable firewalld, your containers will fail to resolve any domain name through DNS. This appears to be another intentional attempt to cripple the Docker Engine to force the use of podman in CentOS 8 instead.

Reboot the system to make the changes take effect.

sudo reboot