Red Hat Enterprise Linux Server 版本 7.9(Maipo)上的 Docker CE 升级

Red Hat Enterprise Linux Server 版本 7.9(Maipo)上的 Docker CE 升级

尝试在 Linux 机器上安装 docker,出现一些奇怪的错误。

当我安装 docker ce 时 - 依赖项是 docker-ce-rootless-extras​,当我安装 docker-ce-rootless-extras 时 - 依赖项是 docker-ce

错误

[root@XXXX yum.repos.d]# rpm -ivh https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-20.10.0-3.el7.x86_64.rpm
Retrieving https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-20.10.0-3.el7.x86_64.rpm
warning: /var/tmp/rpm-tmp.8moqkE: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
error: Failed dependencies:
        docker-ce-rootless-extras is needed by docker-ce-3:20.10.0-3.el7.x86_64
[root@XXXX yum.repos.d]# rpm -ivh https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-rootless-extras-20.10.0-3.el7.x86_64.rpm
Retrieving https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-rootless-extras-20.10.0-3.el7.x86_64.rpm
warning: /var/tmp/rpm-tmp.m7QmNS: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
error: Failed dependencies:
        docker-ce is needed by docker-ce-rootless-extras-0:20.10.0-3.el7.x86_64
        fuse-overlayfs >= 0.7 is needed by docker-ce-rootless-extras-0:20.10.0-3.el7.x86_64
        slirp4netns >= 0.4 is needed by docker-ce-rootless-extras-0:20.10.0-3.el7.x86_64 

答案1

问题是 Docker CE 不受 REHL 官方支持。

获得http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-3.el7.noarch.rpm sudo rpm -i 容器-selinux-2.107.el7.noarch.rpm

获得http://mirror.centos.org/centos/7/extras/x86_64/Packages/slirp4netns-0.4.3-4.el7_8.x86_64.rpm

#在 RHEL 上设置 Docker CE 存储库:sudo yum install -y yum-utils sudo yum install -y device-mapper-persistent-data lvm2 sudo yum-config-manager --add-repohttps://download.docker.com/linux/centos/docker-ce.repo sudo yum makecache fast yum install docker-ce docker-ce-cli containerd.io #启动Docker:sudo systemctl start docker

#测试你的 Docker CE 安装:sudo docker run hello-world

相关内容