首页 > 解决方案 > 在离线 Centos 服务器上安装 docker

问题描述

当我想将 docker 安装到离线 Centos 7 服务器时,我遇到了一些问题。我已经在我的本地虚拟机(内核 3.10 的 Centos 7)中执行了以下指令来打包 docker install 依赖项:

 yumdownloader --resolve docker 
 tar cvzf ~/docker.tar.gz *

在我运行下一个命令将 docker 安装到我的目标服务器 centos 7 kernel 3.10 之后

tar xvf docker.tar.gz -C ~/docker
rpm -ivh --replacefiles --replacepkgs *.rpm

但我很困惑如何解决下一个版本问题

error: Failed dependencies:
        audit-libs(x86-64) = 2.8.5-4.el7 is needed by audit-libs-python-2.8.5-4.el7.x86_64
        policycoreutils >= 2.5-11 is needed by container-selinux-2:2.119.2-1.911c772.el7_8.noarch
        selinux-policy >= 3.13.1-216.el7 is needed by container-selinux-2:2.119.2-1.911c772.el7_8.noarch
        selinux-policy-base >= 3.13.1-216.el7 is needed by container-selinux-2:2.119.2-1.911c772.el7_8.noarch
        selinux-policy-targeted >= 3.13.1-216.el7 is needed by container-selinux-2:2.119.2-1.911c772.el7_8.noarch
        libdevmapper.so.1.02(DM_1_02_97)(64bit) is needed by docker-2:1.13.1-203.git0be3e21.el7.centos.x86_64
        libsystemd.so.0()(64bit) is needed by docker-2:1.13.1-203.git0be3e21.el7.centos.x86_64
        libsystemd.so.0(LIBSYSTEMD_209)(64bit) is needed by docker-2:1.13.1-203.git0be3e21.el7.centos.x86_64
        device-mapper-libs >= 7:1.02.97 is needed by docker-common-2:1.13.1-203.git0be3e21.el7.centos.x86_64
        libsemanage = 2.5-14.el7 is needed by libsemanage-python-2.5-14.el7.x86_64
        libsemanage.so.1(LIBSEMANAGE_1.1)(64bit) is needed by libsemanage-python-2.5-14.el7.x86_64
        libsepol.so.1(LIBSEPOL_1.0)(64bit) is needed by policycoreutils-python-2.5-34.el7.x86_64
        policycoreutils = 2.5-34.el7 is needed by policycoreutils-python-2.5-34.el7.x86_64
        libselinux >= 2.5-14.1 is needed by setools-libs-3.3.8-4.el7.x86_64
        libsepol >= 2.5-10 is needed by setools-libs-3.3.8-4.el7.x86_64

标签: dockercentos7rpm

解决方案


推荐阅读