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
7 comments on “How to Install Docker-CE on RHEL 8”
That must have been changed recently, which is good. At the time of this writing, there was a hard coded 7.
I think that you dont have to use the [sed] command .
I opened the repo file and found its uses these urls :
Which will automatically determine your centos version and your cpu architect .
Thank you! I was starting to bang my head on the wall! This post is on point as I found the mentioned article and couldnt get it installed until I utiized the sed for replacing the 7 with 8 as I intentionally didnt install the container tools on server install.
No longer seems to work, containerd now has a conflict and does not seem to want to install without using –nobest option.
I just tested it and it works for me. Please share the what you are seeing. I’m thinking that you didn’t uninstall runc or one of the dependencies.
I had the same problem. I had to uninstall all podman stuff before trying again: rpm -qa | grep podman | xargs yum -y autoremove