Delete the old version. In order to ensure uniformity, it is recommended that everyone implement it. If yum
reports that these packages are not installed, you can go to the next step.
yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
Install the yum-utils
package (provides the yum-config-manager
utility) and set up a stable repository.
yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Install the latest version of the Docker Engine and container, Centos8 skip look below
yum install docker-ce docker-ce-cli containerd.io
I’m from Centos 8.1 and I’m reporting an error here
Problem:package docker-ce-3:19.03.4-3.el7.x86_64 requires containerd.io >=1.2.2-3
So I need to install the new version of containerd.io first
dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
yum install docker-ce docker-ce-cli
Start docker
systemctl start docker
View version
docker --version
Self-start
systemctl enable docker
Recommended Posts