Chat Zalo Chat Messenger Phone Number Đăng nhập
Docker offline installation in Centos7/RHEL7 - LinkedIn

Docker offline installation in Centos7/RHEL7 – LinkedIn

This is a machine in which internet access is present, we have to collect all these rpm and convert it into tar file [root@vikasmathur] # yumdownloader -resolve docker-ce Loaded plugins: fastestmirror Loading mirror speeds from cached host file * base: repo.inara.pk * epel: mirrors.aliyun.com * Extras: repo.inara.pk * Updates: repo.inara.pk -> Execution of transaction verification -> The docker-ce.x86_64 package will be installed 3:18.09.1-3.el7 -> Processing dependency: container-selinux >= 2.9 for package: 3:docker-ce-18.09.1-3.el7.x86_64 -> Processing dependency: libseccomp >= 2.3 for package: 3:docker-ce-18.09.1-3.el7.x86_64 -> Processing dependency: containerd.io for package: 3:docker-ce-18.09.1-3.el7.x86_64 -> Processing dependency: docker-ce-cli for package: 3:docker-ce-18.09.1-3.el7.x86_64 -> Processing dependency: libcgroup for package: 3:docker-ce-18.09.1-3.el7.x86_64 -> Processing dependency: libseccomp.so.2()(64bit) for package: 3:docker-ce-18.09.1-3.el7.x86_64 -> Execution of transaction check -> The container-selinux.noarch package will be installed 2:2.74-1.el7 -> Processing dependency: policycoreutils-python for package: 2:container-selinux-2.74-1.el7.noarch -> package will be installed containerd.io.x86_64 0:1.2.2-3.el7 -> The docker-ce-cli.x86_64 package will be installed 1:18.09.1-3.el7 -> Package will be installed libcgroup.x86_64 0:0.41-20.el7 -> Package libseccomp.x86_64 0:2.3.1-3.el7 will be installed -> Execution of transaction checking -> PolicycoreUtils-python.x86_64 package 0:2.5-29.el7_6.1 will be installed -> Processing dependency: policycoreutils = 2.5-29.el7_6.1 For package: policycoreutils-python-2.5-29.el7_6.1.x86_64 -> Processing dependency: setools-libs >= 3.3.8-4 for the package: policycoreutils-python-2.5-29.el7_6.1.x86_64 -> Processing dependency: libsemanage-python >= 2.5-14 for package: policycoreutils-python-2.5-29.el7_6.1.x86_64 -> Processing dependency: audit-libs-python >= 2.1.3-4 for package: policycoreutils-python-2.5-29.el7_6.1.x86_64 -> Processing dependency: python-IPy for package: policycoreutils-python-2.5-29.el7_6.1.x86_64 -> Processing dependency: libqpol.so.1(VERS_1.4)(64bit) for the Package: policycoreutils-python-2.5-29.el7_6.1.x86_64 -> Processing dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycoreutils-python-2.5-29.el7_6.1.x86_64 -> Processing dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycoreutils-python-2.5-29.el7_6.1.x86_64 -> Processing dependency: checkpolicy for package: policycoreutils-python-2.5-29.el7_6.1.x86_64 -> Processing unit: libqpol.so.1()(64bit) for the Package: policycoreutils-python-2.5-29.el7_6.1.x86_64 -> Processing dependency: libapol.so.4()(64bit) For package: policycoreutils-python-2.5-29.el7_6.1.x86_64 -> Execution of transaction checking -> Package audit-libs-python.x86_64 0:2.8.4-4.el7 will be installed -> Package checkpolicy.x86_64 0:2.5-8.el7 will be installed -> Package libsemanage-python.x86_64 0:2.5-14.el7 will be installed -> The package will be updated policycoreutils.x86_64 0:2.5-29.el7 -> Package policycoreutils.x86_64 0:2.5-29.el7_6.1 will be an update -> The python-IPy.noarch package 0:0.75-6.el7 -> The setools-libs.x86_64 package will be installed 0:3.3.8-4.el7 -> Dependency resolution completed Delta RPMs disabled because /usr/bin/applydeltarpm not installed. (1/13): container-selinux-2.74-1.el7.noarch.rpm | 38 KB 00:01 (2/13): audit-libs-python-2.8.4-4.el7.x86_64.rpm | 76 kB 00:01 (3/13): checkpolicy-2.5-8.el7.x86_64.rpm | 295 KB 00:02 (4/13): libseccomp-2.3.1-3.el7.x86_64.rpm | 56 KB 00:00 (5/13): libsemanage-python-2.5-14.el7.x86_64.rpm | 113 KB 00:01 (6/13): libcgroup-0.41-20.el7.x86_64.rpm | 66 KB 00:02 (7/13): policycoreutils-python-2.5-29.el7_6.1.x86_64.rpm | 456 KB 00:03 (8/13): python-IPy-0.75-6.el7.noarch.rpm | 32 KB 00:02 (9/13): policycoreutils-2.5-29.el7_6.1.x86_64.rpm | 916 KB 00:14 (10/13): setools-libs-3.3.8-4.el7.x86_64.rpm | 620 kB 00:12 warning: /root/docker/docker-ce-cli-18.09.1-3.el7.x86_64.rpm: RSA/SHA512 header V4 Signature, key ID 621e9f35: NOKEY The public key for docker-ce-cli-18.09.1-3.el7.x86_64.rpm is not installed (11/13): docker-ce-cli-18.09.1-3.el7.x86_64.rpm | 14 MB 01:37 (12/13): docker-ce-18.09.1-3.el7.x86_64.rpm | 19 MB 02:23 The public key for containerd.io-1.2.2-3.el7.x86_64.rpm is not installed 00:00 ETA (13/13): containerd.io-1.2.2-3.el7.x86_64.rpm | 22 MB 02:26 [root@vikasmathur]# ls audit-libs-python-2.8.4-4.el7.x86_64.rpm checkpolicy-2.5-8.el7.x86_64.rpm containerd.io-1.2.2-3.el7.x86_64.rpm container-selinux-2.74-1.el7.noarch.rpm docker-ce-18.09.1-3.el7.x86_64.rpm docker-ce-cli-18.09.1-3.el7.x86_64.rpm libcgroup-0.41-20.el7.x86_64.rpm libseccomp-2.3.1-3.el7.x86_64.rpm libsemanage-python-2.5-14.el7.x86_64.rpm policycoreutils-2.5-29.el7_6.1.x86_64.rpm policycoreutils-python-2.5-29.el7_6.1.x86_64.rpm python-IPy-0.75-6.el7.noarch.rpm setools-libs-3.3.8-4.el7.x86_64.rpm [root@vikasmathur ~]# mkdir docker [root@vikasmathur ~]# tar xvf docker.tar.gz -C ~/docker audit-libs-python-2.8.4-4.el7.x86_64.rpm checkpolicy-2.5-8.el7.x86_64.rpm containerd.io-1.2.2-3.el7.x86_64.rpm container-selinux-2.74-1.el7.noarch.rpm docker-ce-18.09.1-3.el7.x86_64.rpm docker-ce-cli-18.09.1-3.el7.x86_64.rpm libcgroup-0.41-20.el7.x86_64.rpm libseccomp-2.3.1-3.el7.x86_64.rpm libsemanage-python-2.5-14.el7.x86_64.rpm policycoreutils-2.5-29.el7_6.1.x86_64.rpm policycoreutils-python-2.5-29.el7_6.1.x86_64.rpm python-IPy-0.75-6.el7.noarch.rpm setools-libs-3.3.8-4.el7.x86_64.rpm [root@vikasmathur ~]# cd~ [root@vikasmathur ~]# ls -lrth [root@vikasmathur ~]# docker.tar.gz copy this tar file and put this file on the Linux machine where there is no Internet [root@machine ~]# mkdir salt [root@machine ~]# cd salt [root@machine salt]# yumdownloader -resolve docker Loaded Plugins: FastestMirror, Langpacks Loading mirror speeds from cached host file * Base: centos.excellmedia.net * Extras: centos.excellmedia.net * Updates: centos.excellmedia.net -> Execution of transaction verification -> The package will be installed docker.x86_64 2:1.13.1-209.git7d71120.el7.centos -> Processing dependency: docker-common = 2:1.13.1-209.git7d71120.el7.centos for package: 2:docker-1.13.1-209.git7d71120.el7.centos.x86_64 -> Processing dependency: docker-client = 2:1.13.1-209. git7d71120.el7.centos for package: 2:docker-1.13.1-209.git7d71120.el7.centos.x86_64 -> Processing dependency: subscription-manager-rhsm-certificates for package: 2:docker-1.13.1-209.git7d71120.el7.centos.x86_64 -> Execution of transaction checking -> docker-client.x86_64 package 2:1.13.1-209.git7d71120.el7.centos will be installed -> docker-common.x86_64 package 2:1.13.1-209.git7d71120.el7.centos -> Processing dependency: skopeo-containers >= 1:0.1.26-2 for package: 2:docker-common-1.13.1-209.git7d71120.el7.centos.x86_64 -> Processing dependency: oci-umount >= 2:2.3.3-3 for package: 2:docker-common-1.13.1-209.git7d71120.el7.centos.x86_64 -> Processing dependency: oci-systemd-hook >= 1:0.1.4-9 for package: 2:docker-common-1.13.1-209.git7d71120.el7.centos.x86_64 -> Processing dependency: oci-register-machine >= 1:0-5.13 for package: 2: docker-common-1.13.1-209.git7d71120.el7.centos.x86_64 -> Processing dependency: container-storage-setup >= 0.9.0-1 for package: 2:docker-common-1.13.1-209.git7d71120.el7.centos.x86_64 -> Processing dependency: atomic-registries for package: 2:docker-common-1.13.1-209.git7d71120.el7.centos.x86_64 -> Package subscription-manager-rhsm-certificates.x86_64 0:1.24.51-1.el7.centos will be installed -> Execution of transaction check -> Se You will install the atomic-registries.x86_64 package 1:1.22.1-33.gitb507039.el7_8 -> Processing Dependency: python-pytoml For package: 1:atomic-registries-1.22.1-33.gitb507039.el7_8.x86_64 -> container-storage-setup.noarch package 0:0.11.0-2.git5eaf76c.el7 will be installed -> Package containers will be installed-common.x86_64 1:0.1.40-11.el7_8 -> Processing dependency: subscription-manager for package: 1:containers-common-0.1.40-11.el7_8.x86_64 -> Processing dependency: slirp4netns for package: 1:containers-common-0.1.40-11.el7_8.x86_64 -> Processing Dependency: fuse-overlayfs for package: 1:containers-common-0.1.40-11.el7_8.x86_64 -> The oci-register-machine.x86_64 package will be installed 1:0-6.git2b44233.el7 -> The oci-systemd-hook.x86_64 1:0.2.0-1.git05e6923.el7_6 -> package will be installed the oci-umount.x86_64 package 2:2.5-3.el7 -> Execution of the transaction check -> Se You will install the fuse-overlayfs.x86_64 package 0:0.7.2-6.el7_8 -> Processing dependency: libfuse3.so.3(FUSE_3.2)(64bit) for package: fuse-overlayfs-0.0.7.2-6.el7_8.x86_64 -> Processing dependency: libfuse3.so.3(FUSE_3.0)(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64 -> Processing dependency: libfuse3.so.3()(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64 -> python-pytoml.noarch package 0:0.1.14-1.git7dea353.el7 se will install -> Package will be installed slirp4netns.x86_64 0:0.4.3-4.el7_8 -> Subscription package will be installed-manager.x86_64 0:1.24.51-1.el7.centos -> Processing dependency: subscription-manager-rhsm = 1.24.51 for package: subscription-manager-1.24.51-1.el7.centos.x86_64 -> Processing dependency: python-dmidecode >= 3.12.2-2 for package: subscription-manager-1.24.51-1.el7.centos.x86_64 -> Processing dependency: python-syspurpose for the Package: subscription-manager-1.24.51-1.el7.centos.x86_64 -> Processing dependency: python-dateutil for package: subscription-manager-1.24.51-1.el7.centos.x86_64 -> Running transaction check -> The fuse3-libs.x86_64 package will be installed 0:3.6.1-4.el7 -> The python-dateutil.noarch package 0:1.5-7.el7 -> The python-dmidecode.x86_64 package will be installed 0:3.12.2-4.el7 -> The python-syspurpose.x86_64 package 0:1.24.51-1 will be installed. el7.centos -> The subscription-manager-rhsm.x86_64 package will be installed 0:1.24.51-1.el7.centos -> Processing conflict: 1:docker-ce-cli-19.03.5-3.el7.x86_64 Docker -> conflicts Processing conflict: 1:docker-ce-cli-19.03.5-3.el7.x86_64 docker-io -> conflicts Dependency resolution completed (1/19): container-storage-setup-0.11.0-2.git5eaf76c.el7.noarch.rpm | 35 kB 00:00:00 (2/19): atomic-registries-1.22.1-33.gitb507039.el7_8.x86_64.rpm | 36 KB 00:00:00 (3/19): containers-common-0.1.40-11.el7_8.x86_64.rpm | 43 KB 00:00:00 (4/19): docker-client-1.13.1-209.git7d71120.el7.centos.x86_64.rpm | 3.9 MB 00:00:00 (5/19): docker-common-1.13.1-209.git7d71120.el7.centos.x86_64.rpm | 101 kB 00:00:00 (6/19): fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm | 54 KB 00:00:00 (7/19): fuse3-libs-3.6.1-4.el7.x86_64.rpm | 82 KB 00:00:00 (8/19): docker-1.13.1-209.git7d71120.el7.centos.x86_64.rpm | 17 MB 00:00:01 (9/19): oci-register-machine-0-6.git2b44233.el7.x86_64.rpm | 1.1 MB 00:00:00 (10/19): oci-systemd-hook-0.2.0-1.git05e6923.el7_6.x86_64.rpm | 34 kB 00:00:00 (11/19): oci-umount-2.5-3.el7.x86_64.rpm | 33 KB 00:00:00 (12/19): python-pytoml-0.1.14-1.git7dea353.el7.noarch.rpm | 18 KB 00:00:00 (13/19): slirp4netns-0.4.3-4.el7_8.x86_64.rpm | 81 KB 00:00:00 (14/19): subscription-manager-1.24.51-1.el7.centos.x86_64.rpm | 1.1 MB 00:00:00 (15/19): subscription-manager-rhsm-1.24.51-1.el7.centos.x86_64.rpm | 334 kB 00:00:00 (16/19): subscription-manager-rhsm-certificates-1.24.51-1.el7.centos.x86_64.rpm | 237 KB 00:00:00 (17/19): python-dmidecode-3.12.2-4.el7.x86_64.rpm | 83 KB 00:00:00 (18/19): python-dateutil-1.5-7.el7.noarch.rpm | 85 KB 00:00:00 (19/19): python-syspurpose-1.24.51-1.el7.centos.x86_64.rpm | 275 kB 00:00:00 [root@machine salt]# ls -l total 25456 -rw-r-r-. 1 root root 36784 28 Apr 2020 atomic-registries-1.22.1-33.gitb507039.el7_8.x86_64.rpm -rw-r-r-. 1 root root 44448 Jul 6 2020 containers-common-0.1.40-11.el7_8.x86_64.rpm -rw-r-r-. 1 root root 35364 Aug 21 2018 container-storage-setup-0.11.0-2.git5eaf76c.el7.noarch.rpm -rw-r-r-. 1 root 18088428 Mar 3 09:32 docker-1.13.1-209.git7d71120.el7.centos.x86_64.rpm -rw-r-r-. 1 root root 4090900 Mar 3 09:32 docker-client-1.13.1-209.git7d71120.el7.centos.x86_64.rpm -rw-r-r-. 1 root root 103268 Mar 3 09:32 docker-common-1.13.1-209.git7d71120.el7.centos.x86_64.rpm -rw-r-r-. 1 root root 83764 Apr 28 2020 fuse3-libs-3.6.1-4.el7.x86_64.rpm -rw-r-r-. 1 root root 55796 28 Apr 2020 fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm -rw-r-r-. 1 root 1109112 Mar 9 2018 oci-register-machine-0-6.git2b44233.el7.x86_64.rpm -rw-r-r-. 1 root root 34784 Jun 18 2019 oci-systemd-hook-0.2.0-1.git05e6923.el7_6.x86_64.rpm -rw-r-r-. 1 root root 34040 Sep 16 2019 oci-umount-2.5-3.el7.x86_64.rpm -rw-r-r-. 1 root root 86832 Jul 4 2014 python-dateutil-1.5-7.el7.noarch.rpm -rw-r-r-. 1 root root 85056 3 Apr 2020 python-dmidecode-3.12.2-4.el7.x86_64.rpm -rw-r-r-. 1 root root 18692 Nov 28 2017 python-pytoml-0.1.14-1.git7dea353.el7.noarch.rpm -rw-r-r-. 1 root 281568 May 19 08:51 python-syspurpose-1.24.51-1.el7.centos.x86_64.rpm -rw-r-r-. 1 root root 83452 28 Apr 2020 slirp4netns-0.4.3-4.el7_8.x86_64.rpm -rw-r-r-. 1 root root 1171768 May 19 08:51 subscription-manager-1.24.51-1.el7.centos.x86_64.rpm -rw-r-r-. 1 root 341928 May 19 08:51 subscription-manager-rhsm-1.24.51-1.el7.centos.x86_64.rpm -rw-r-r-. 1 root 243104 May 19 08:51 subscription-manager-rhsm-certificates-1.24.51-1.el7.centos.x86_64.rpm [root@machine salt]# rpm -ivh -replacefiles -replacepkgs *.rpm error: Dependencies failed: docker conflicts with (installed) docker-ce-cli-1:19.03.5-3.el7.x86_64 docker-io conflicts with (installed) docker-ce-cli-1:19.03.5-3.el7.x86_64 [root@machine salt]# yum remove docker-ce-cli* Loaded plugins: fastestmirror, langpacks Dependency resolution -> Execution of the transaction checking -> docker-ce-cli.x86_64 package 1:19.03.03.03.5-3.el7 will be deleted -> Terminated dependency resolution dependencies Resolved ================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== ===x86_64=======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================5-3.el7 installed 169 M Transaction Summary =================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== ================= Deletion : 1:docker-ce-cli-19.03.5-3.el7.x86_64 1/1 Verifying: 1:docker-ce-cli-19.03.5-3.el7.x86_64 1/1 Deleted: docker-ce-cli.x86_64 1:19.03.5-3.el7 Complete! [root@machine salt]# rpm -ivh -replacefiles -replacepkgs *.rpm Preparing…###### 1:subscription-manager-rhsm-certifi#### [ 5%] 2:python-dateutil-1..5-7.el7 ### [ 11%] 3:#subscription-manager-rhsm-1.24.51### [ 16%] 4:slirp4netns-0.4.3-4.el7_8 ### 6:python-pytoml-0.1.14-1.git7dea353# :1.22.1-33.git#### [ 37%] 8:python-dmidecode-3.12.2-4.el7 #### [ 42%] 9:subscription-manager-1.24.51-1.1.el##### [ 47%] 10:oci-umount-2:2.5-3.el7 ### [ 53%] 11:oci-systemd-hook-1:0.2.0-1.git05e### [ 58%] 12:oci-register-machine-1:0-6.git2b4# [ 63%] 13:fuse3-libs-3.6.1-4.el7 ##### [ 68%] 14::0 fuse-overlayfs-0.7.2-6.el7_8 ### [ 74%] 15:containers-common-1:0.1.40-11.el7#container-storage-setup-0.11.0-2.###### [ 84%] 17:docker-common-2:1.13.1-209.git7d7### [ 89%] 18:docker-client-2:1.13.1-209.git7d7### [ 95%] 19:docker-2:1.13.1-209.git7d71120.el ##### [100%] [root@machine salt]# [root@machine salt]# which docker /bin/docker [root@machine salt]# systemctl enable docker A link was created symbolic from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service. [root@machine salt]# systemctl start docker [root@machine salt]# systemctl status docker ● docker.service – Docker application container engine Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; provider preset: disabled) Active: active (running) since Thu 2022-06-02 13:30:57 EDT; 9s Aug Documents: http://docs.docker.com main PID: 3678 (dockerd-current) Tasks: 24 CGroup: /system.slice/docker.service ├─3678 /usr/bin/dockerd-current -add-runtime docker-runc=/usr/libexec/docker/docker-runc-current… └─3686 /usr/bin/docker-containerd-current -l unix:///var/run/docker/libcontainerd/docker-containe… Jun 02 13:30:55 machine dockerd-current[3678]: time=”2022-06-02T13:30:55.701582023-04:00″ level=info msg… 686″ Jun 02 13:30:56 machine dockerd-current[3678]: time=”2022-06-02T13:30:56.859651316-04:00″ level=info msg… nds” Jun 02 13:30:56 machine dockerd-current[3678]: time=”2022-06-02T13:30:56.861443240-04:00″ level=info msg… rt.” Jun 02 13:30:56 machine dockerd-current[3678]: time=”2022-06-02T13:30:56.879254055-04:00″ level=info msg… lse” Jun 02 13:30:56 machine dockerd-current[3678]: time=”2022-06-02T13:30:56.932399150-04:00″ level=info msg… ess” Jun 02 13:30:56 machine dockerd-current[3678]: time=”2022-06-02T13:30:56.970178123-04:00″ level=info msg… ne.” Jun 02 13:30:56 machine dockerd-current[3678]: time=”2022-06-02T13:30:56.996310969-04:00″ level=info msg… ion” Jun 02 13:30:56 machine dockerd-current[3678]: time=”2022-06-02T13:30:56.996350303-04:00″ level=info msg… 13.1 Jun 02 13:30:57 machine dockerd-current[3678]: time=”2022-06-02T13:30:57.000889758-04:00″ level=info msg… ock” Jun 02 13:30:57 machine systemd[1]: Started Docker Application Container Engine. Hint: Some lines were eclipsed, use -l to show in full. [root@machine salt]# Docker Client version: Version: 1.13.1 API version: 1.26 Package version: docker-1.13.1-209.git7d71120.el7.centos.x86_64 Go version: go1.10.3 Git commit: 7d71120/1.13.1 Built: Wed Mar 2 15:25:43 2022 OS/Arc: Linux/amd64 Server: Version: 1.13.1 API version: 1.26 (minimum version 1.12) Package version: docker-1.13.1-209.git7d71120.el7.centos.x86_64 Go version: go1.10.3 Git confirmation: 7d71120 / 1.13.1 Built: Wed Mar 2 15:25:43 2022 OS / Arc: linux / amd64 Experimental: false [root@machine salt]# important docker dependency links wget http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-1.el7_6.noarch.rpm wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-19.03.5-3.el7.x86_64.rpm wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-cli-19.03.5-3.el7.x86_64.rpm wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.3.ce-1.el7.noarch.rpm wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm

Contact US