yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io
执行安装命令后报错,提示 containerd.io 版本过低
Error:
Problem: package docker-ce-3:19.03.8-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed
...
安装最新的 containerd.io
yum install https://download.docker.com/linux/fedora/30/x86_64/stable/Packages/containerd.io-1.2.13-3.1.fc30.x86_64.rpm
然后安装 docker-ce
yum install docker-ce docker-ce-cli containerd.io
这个时候又报错,docker-ce 与 podman-manpages 冲突
Error: Transaction check error:
file /usr/share/man/man1/docker-attach.1.gz from install of docker-ce-cli-1:19.03.8-3.el7.x86_64 conflicts with file from package podman-manpages-1.4.2-5.module_el8.1.0+237+63e26edc.noarch
...
卸载 podman-manpages
yum remove podman-manpages.noarch
卸载后再次执行安装命令,完成后查看是否安装成功
docker -v
Docker version 19.03.8, build afacb8b
启动 docker
systemctl start docker
设置 docker 开机启动
systemctl enable docker