If you’ve searched google to figure out how to install Docker-CE on RHEL 8, you may have been led to this very popular article: LinuxConfig.org: How to Install Docker on RHEL 8. If you’d read closely, you might have read a false statement which says, “What version to install? Well, Red Hat seems to have somehow blocked the installation of containerd.io > 1.2.0-3.el7, which is a dependency of docker-ce.” This statement is completely wrong. What’s going on here is two fold:
- This article shows the user how to install the wrong version of Docker-CE. It demonstrates how to install the version for CentOS 7, not CentOS 8 (which does work).
- This article does not verify that the container-tools module is uninstalled
To be fair, the upstream Docker CE docs also demonstrate how to install the version made for CentOS 7, so it’s kind of understandable that they are wrong on LinuxConfig.org. Let’s dig into how to install the right version, which works on RHEL 8.
Install Docker CE
First, verify that the container-tools module is uninstalled:
yum module remove container-tools
Now, add the Docker CE repository:
yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo
Finally, install Docker CE:
yum install docker-ce
That’s it. That’s all it takes. Docker CE will install and run just fine on RHEL 8. Red Hat did not, in fact, figure out some way to block the installation of Docker on RHEL 8. That said, Red Hat does recommend Podman on RHEL 8. For more information, check out this blog: RHEL 8 enables containers with the tools of software craftsmanship. As always, leave any questions or comments you have below, and feel free to follow me on Twitter: @fatherlinux