环境
Centos.8
阿里云
失败案例
1.进入阿里云镜像地址,执行下方命令
yum install -y https://mirrors.aliyun.com/docker-ce/linux/centos/7/x86_64/edge/Packages/containerd.io-1.2.13-3.1.el7.x86_64.rpm
2.再执行安装命令
yum install docker-ce docker-ce-cli containerd.io
后面安装的过程中直接点y就行,这也是我在网上收集看到的,执行不太有效...
成功案例
yum找不到安装包 => Error: No matching Packages to list
[root@iZ2zeca7jric8sx4f3n7spZ ~]# yum list docker-ce --showduplicates |sort -r
Error: No matching Packages to list
Last metadata expiration check: 0:00:01 ago on Thu 24 Dec 2020 12:15:43 PM CST.
CentOS Linux 8 - Extras 1.5 kB/s | 8.6 kB 00:05
CentOS Linux 8 - BaseOS 17 kB/s | 2.3 MB 02:14
一波操作之后
sudo yum update
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo yum makecache
可以找到docker安装包了
[root@iZ2zeca7jric8sx4f3n7spZ ~]# yum list docker-ce --showduplicates | sort -r
Last metadata expiration check: 0:00:04 ago on Thu 24 Dec 2020 12:17:07 PM CST.
docker-ce.x86_64 3:20.10.1-3.el7 docker-ce-stable
docker-ce.x86_64 3:20.10.0-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.9-3.el7 docker-ce-stable
docker-ce.x86_64 3:19.03.8-3.el7 docker-ce-stable
#省略N行...
安装docker.{3:20.10.1-3.el7}版本
#安装
[root@iZ2zeca7jric8sx4f3n7spZ ~]# yum -y install docker-ce-20.10.1-3.el7
Last metadata expiration check: 0:09:03 ago on Thu 24 Dec 2020 01:27:40 PM CST.
Error:
Problem: package docker-ce-3:20.10.1-3.el7.x86_64 requires containerd.io >= 1.4.1, but none of the providers can be installed
- conflicting requests
- package containerd.io-1.4.3-3.1.el7.x86_64 is filtered out by modular filtering
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
安装container
阿里源地址"https://mirrors.aliyun.com/docker-ce/linux/centos/8"
[root@iZ2zeca7jric8sx4f3n7spZ ~]# yum install -y https://mirrors.aliyun.com/docker-ce/linux/centos/8/x86_64/edge/Packages/containerd.io-1.3.7-3.1.el8.x86_64.rpm
Last metadata expiration check: 0:15:29 ago on Thu 24 Dec 2020 01:27:40 PM CST.
containerd.io-1.3.7-3.1.el8.x86_64.rpm 13 MB/s | 29 MB 00:02
Dependencies resolved.
#省略N行...
//安装后发现,containerd版本太低还是不行...
"requires containerd.io >= 1.4.1",但是我安装的是"containerd.io-1.3.7-3.1.el8.x86_64.rpm"
安装docker其它版本
#安装
[root@iZ2zeca7jric8sx4f3n7spZ ~]# yum -y install docker-ce-19.03.9-3.el7
#省略N行
Running transaction
Preparing : 1/1
Installing : docker-ce-cli-1:20.10.1-3.el7.x86_64 1/3
Running scriptlet: docker-ce-cli-1:20.10.1-3.el7.x86_64 1/3
Running scriptlet: libcgroup-0.41-19.el8.x86_64 2/3
Installing : libcgroup-0.41-19.el8.x86_64 2/3
Running scriptlet: libcgroup-0.41-19.el8.x86_64 2/3
Installing : docker-ce-3:19.03.9-3.el7.x86_64 3/3
Running scriptlet: docker-ce-3:19.03.9-3.el7.x86_64 3/3
Verifying : libcgroup-0.41-19.el8.x86_64 1/3
Verifying : docker-ce-3:19.03.9-3.el7.x86_64 2/3
Verifying : docker-ce-cli-1:20.10.1-3.el7.x86_64 3/3
Installed:
docker-ce-3:19.03.9-3.el7.x86_64 docker-ce-cli-1:20.10.1-3.el7.x86_64 libcgroup-0.41-19.el8.x86_64
Complete!
可以看到,安装了["docker-ce-3:19.03.9-3.el7.x86_64","docker-ce-cli-1:20.10.1-3.el7.x86_64","libcgroup-0.41-19.el8.x86_64"]