我有 CentOS 7 服务器并docker-ce-18.06.1.ce-3.el7.x86_64
安装。现在我想升级到最新的 docker rpm。但yum upgrade docker-ce
不显示最新的包。有帮助解决这个问题吗?
没有列出最新的 rpm
yum list docker-ce --show-duplicates
Loaded plugins: copr, fastestmirror, rhnplugin
Installed Packages
docker-ce.x86_64 18.06.1.ce-3.el7 @docker-ce-stable
所有存储库均已启用
# yum repolist
Loaded plugins: copr, fastestmirror
repo id repo name status
base/7/x86_64 CentOS-7 - Base 10,060+10
docker-ce-stable/x86_64 Docker CE Stable - x86_64 12+67
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13,335+1
extras/7/x86_64 CentOS-7 - Extras 356+41
google-chrome google-chrome 3
group_spacewalkproject-nightly-client/x86_64 Copr repo for nightly-client owned by @spacewalkproject 59+21
nodesource/x86_64 Node.js Packages for Enterprise Linux 7 - x86_64 97
updates/7/x86_64 CentOS-7 - Updates 831+30
yarn Yarn Repository 50
repolist: 24,803
此命令返回任何包
yum --disablerepo=* --enablerepo=docker-ce-stable upgrade
添加回购详细信息
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://download.docker.com/linux/centos/7/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/centos/gpg
答案1
我发现 /etc/yum.conf 文件有 docker 包的排除列表。我用这个命令来安装包
yum --disablerepo=* --enablerepo=docker-ce-stable upgrade --disableexcludes=all docker-ce
谢谢