Installing the CentOS 8 operating system itself was discussed earlier in this article.
Docker on CentOS 8: installation error
When trying to install Docker on Centos 8 from the official repository, I received the following error:
Error: Problem: package docker-ce-3:19.03.4-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 containerd.io-1.2.10-3.2.el7.x86_64 is excluded - package containerd.io-1.2.2-3.3.el7.x86_64 is excluded - package containerd.io-1.2.2-3.el7.x86_64 is excluded - package containerd.io-1.2.4-3.1.el7.x86_64 is excluded - package containerd.io-1.2.5-3.1.el7.x86_64 is excluded - package containerd.io-1.2.6-3.3.el7.x86_64 is excluded - package containerd.io-1.2.6-3.2.el7.x86_64 is excluded (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
The error is caused by the containerd.io dependency, which cannot be automatically installed from the repository.
CentOS 8 install Docker
You can solve this problem by manually installing this package. We begin the installation of docker according to the instructions from the official website:
Install the necessary packages:
sudo yum install -y yum-utils \ device-mapper-persistent-data \ lvm2
Add docker repository:
sudo yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo
Install docker with the –nobest flag (do not limit the transaction to the best candidate):
yum install --nobest docker-ce docker-ce-cli
dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
Now we can upgrade docker to the latest version:
dnf update docker-ce docker-ce-cli