0

I want to install docker into a offline Centos 7 server, but I have missing dependencies.

I have executed the following instruction into my local virtual machine ( Centos 7 with kernel 3.10) to package docker install dependency :

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

Then I ran the next commands to install docker into my target server, centos 7 kernel 3.10 too:

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

But I am confused how to solve the next versioning issue:

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

1 Answer 1

0

This is a complicated issue. Installing dependencies offline is complicated: you don't have the same packages installed on your online and your offline server, so the dependencies don't match.

I have documented here a procedure that will allow you to download the dependencies required for your offline server, but it is quite tricky. It is documented for zypper, but you can transpose it to yum/dnf. The only trouble is that for dnf it only worked as root (the last time I tested): sudo dnf install --downloadonly -c <dnf.conf> --downloaddir=<output_dir> --setopt=reposdir=<repos_dir> --installroot=<tmp_dir>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .