docker离线安装docker
1. 下载docker的rpm以及相关依赖
yum install --downloadonly --downloaddir=/tmp/docker docker
报错:
Error: docker-ce-cli conflicts with 2:docker-1.13.1-109.gitcccb291.el7.centos.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
[root@centos7 tmp]# yum list installed | grep docker docker-ce-cli.x86_64 1:18.09.6-3.el7 installed
[root@centos7 tmp]# yum -y remove docker-ce-cli.x86_64
再次下载:
[root@centos7 tmp]# yum install --downloadonly --downloaddir=/tmp/docker docker
[root@centos7 tmp]# yum install --downloadonly --downloaddir=/tmp/docker docker Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.tuna.tsinghua.edu.cn * extras: mirrors.tuna.tsinghua.edu.cn * updates: mirrors.tuna.tsinghua.edu.cn Resolving Dependencies --> Running transaction check ---> Package docker.x86_64 2:1.13.1-109.gitcccb291.el7.centos will be installed --> Processing Dependency: docker-common = 2:1.13.1-109.gitcccb291.el7.centos for package: 2:docker-1.13.1-109.gitcccb291.el7.centos.x86_64 --> Processing Dependency: docker-client = 2:1.13.1-109.gitcccb291.el7.centos for package: 2:docker-1.13.1-109.gitcccb291.el7.centos.x86_64 --> Processing Dependency: subscription-manager-rhsm-certificates for package: 2:docker-1.13.1-109.gitcccb291.el7.centos.x86_64 --> Running transaction check ---> Package docker-client.x86_64 2:1.13.1-109.gitcccb291.el7.centos will be installed ---> Package docker-common.x86_64 2:1.13.1-109.gitcccb291.el7.centos will be installed --> Processing Dependency: skopeo-containers >= 1:0.1.26-2 for package: 2:docker-common-1.13.1-109.gitcccb291.el7.centos.x86_64 --> Processing Dependency: oci-umount >= 2:2.3.3-3 for package: 2:docker-common-1.13.1-109.gitcccb291.el7.centos.x86_64 --> Processing Dependency: oci-systemd-hook >= 1:0.1.4-9 for package: 2:docker-common-1.13.1-109.gitcccb291.el7.centos.x86_64 --> Processing Dependency: oci-register-machine >= 1:0-5.13 for package: 2:docker-common-1.13.1-109.gitcccb291.el7.centos.x86_64 --> Processing Dependency: container-storage-setup >= 0.9.0-1 for package: 2:docker-common-1.13.1-109.gitcccb291.el7.centos.x86_64 --> Processing Dependency: container-selinux >= 2:2.51-1 for package: 2:docker-common-1.13.1-109.gitcccb291.el7.centos.x86_64 --> Processing Dependency: atomic-registries for package: 2:docker-common-1.13.1-109.gitcccb291.el7.centos.x86_64 ---> Package subscription-manager-rhsm-certificates.x86_64 0:1.24.13-4.el7.centos will be installed --> Running transaction check ---> Package atomic-registries.x86_64 1:1.22.1-29.gitb507039.el7 will be installed --> Processing Dependency: python-yaml for package: 1:atomic-registries-1.22.1-29.gitb507039.el7.x86_64 --> Processing Dependency: python-setuptools for package: 1:atomic-registries-1.22.1-29.gitb507039.el7.x86_64 --> Processing Dependency: python-pytoml for package: 1:atomic-registries-1.22.1-29.gitb507039.el7.x86_64 ---> Package container-selinux.noarch 2:2.107-3.el7 will be installed --> Processing Dependency: policycoreutils-python for package: 2:container-selinux-2.107-3.el7.noarch ---> Package container-storage-setup.noarch 0:0.11.0-2.git5eaf76c.el7 will be installed ---> Package containers-common.x86_64 1:0.1.37-3.el7.centos will be installed ---> Package oci-register-machine.x86_64 1:0-6.git2b44233.el7 will be installed ---> Package oci-systemd-hook.x86_64 1:0.2.0-1.git05e6923.el7_6 will be installed --> Processing Dependency: libyajl.so.2()(64bit) for package: 1:oci-systemd-hook-0.2.0-1.git05e6923.el7_6.x86_64 ---> Package oci-umount.x86_64 2:2.5-3.el7 will be installed --> Running transaction check ---> Package PyYAML.x86_64 0:3.10-11.el7 will be installed --> Processing Dependency: libyaml-0.so.2()(64bit) for package: PyYAML-3.10-11.el7.x86_64 ---> Package policycoreutils-python.x86_64 0:2.5-33.el7 will be installed --> Processing Dependency: setools-libs >= 3.3.8-4 for package: policycoreutils-python-2.5-33.el7.x86_64 --> Processing Dependency: libsemanage-python >= 2.5-14 for package: policycoreutils-python-2.5-33.el7.x86_64 --> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreutils-python-2.5-33.el7.x86_64 --> Processing Dependency: python-IPy for package: policycoreutils-python-2.5-33.el7.x86_64 --> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycoreutils-python-2.5-33.el7.x86_64 --> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycoreutils-python-2.5-33.el7.x86_64 --> Processing Dependency: libcgroup for package: policycoreutils-python-2.5-33.el7.x86_64 --> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycoreutils-python-2.5-33.el7.x86_64 --> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-33.el7.x86_64 --> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-python-2.5-33.el7.x86_64 --> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-python-2.5-33.el7.x86_64 ---> Package python-pytoml.noarch 0:0.1.14-1.git7dea353.el7 will be installed ---> Package python-setuptools.noarch 0:0.9.8-7.el7 will be installed --> Processing Dependency: python-backports-ssl_match_hostname for package: python-setuptools-0.9.8-7.el7.noarch ---> Package yajl.x86_64 0:2.0.4-4.el7 will be installed --> Running transaction check ---> Package audit-libs-python.x86_64 0:2.8.5-4.el7 will be installed ---> Package checkpolicy.x86_64 0:2.5-8.el7 will be installed ---> Package libcgroup.x86_64 0:0.41-21.el7 will be installed ---> Package libsemanage-python.x86_64 0:2.5-14.el7 will be installed ---> Package libyaml.x86_64 0:0.1.4-11.el7_0 will be installed ---> Package python-IPy.noarch 0:0.75-6.el7 will be installed ---> Package python-backports-ssl_match_hostname.noarch 0:3.5.0.1-1.el7 will be installed --> Processing Dependency: python-ipaddress for package: python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch --> Processing Dependency: python-backports for package: python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch ---> Package setools-libs.x86_64 0:3.3.8-4.el7 will be installed --> Running transaction check ---> Package python-backports.x86_64 0:1.0-8.el7 will be installed ---> Package python-ipaddress.noarch 0:1.0.16-2.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================================================================================= Package Arch Version Repository Size ======================================================================================================================================================================================= Installing: docker x86_64 2:1.13.1-109.gitcccb291.el7.centos extras 18 M Installing for dependencies: PyYAML x86_64 3.10-11.el7 base 153 k atomic-registries x86_64 1:1.22.1-29.gitb507039.el7 extras 35 k audit-libs-python x86_64 2.8.5-4.el7 base 76 k checkpolicy x86_64 2.5-8.el7 base 295 k container-selinux noarch 2:2.107-3.el7 extras 39 k container-storage-setup noarch 0.11.0-2.git5eaf76c.el7 extras 35 k containers-common x86_64 1:0.1.37-3.el7.centos extras 21 k docker-client x86_64 2:1.13.1-109.gitcccb291.el7.centos extras 3.9 M docker-common x86_64 2:1.13.1-109.gitcccb291.el7.centos extras 98 k libcgroup x86_64 0.41-21.el7 base 66 k libsemanage-python x86_64 2.5-14.el7 base 113 k libyaml x86_64 0.1.4-11.el7_0 base 55 k oci-register-machine x86_64 1:0-6.git2b44233.el7 extras 1.1 M oci-systemd-hook x86_64 1:0.2.0-1.git05e6923.el7_6 extras 34 k oci-umount x86_64 2:2.5-3.el7 extras 33 k policycoreutils-python x86_64 2.5-33.el7 base 457 k python-IPy noarch 0.75-6.el7 base 32 k python-backports x86_64 1.0-8.el7 base 5.8 k python-backports-ssl_match_hostname noarch 3.5.0.1-1.el7 base 13 k python-ipaddress noarch 1.0.16-2.el7 base 34 k python-pytoml noarch 0.1.14-1.git7dea353.el7 extras 18 k python-setuptools noarch 0.9.8-7.el7 base 397 k setools-libs x86_64 3.3.8-4.el7 base 620 k subscription-manager-rhsm-certificates x86_64 1.24.13-4.el7.centos updates 228 k yajl x86_64 2.0.4-4.el7 base 39 k Transaction Summary ======================================================================================================================================================================================= Install 1 Package (+25 Dependent packages) Total download size: 25 M Installed size: 89 M Background downloading packages, then exiting: (1/26): atomic-registries-1.22.1-29.gitb507039.el7.x86_64.rpm | 35 kB 00:00:00 (2/26): container-storage-setup-0.11.0-2.git5eaf76c.el7.noarch.rpm | 35 kB 00:00:00 (3/26): containers-common-0.1.37-3.el7.centos.x86_64.rpm | 21 kB 00:00:00 (4/26): container-selinux-2.107-3.el7.noarch.rpm | 39 kB 00:00:00 (5/26): docker-client-1.13.1-109.gitcccb291.el7.centos.x86_64.rpm | 3.9 MB 00:00:01 (6/26): docker-common-1.13.1-109.gitcccb291.el7.centos.x86_64.rpm | 98 kB 00:00:00 (7/26): docker-1.13.1-109.gitcccb291.el7.centos.x86_64.rpm | 18 MB 00:00:03 (8/26): libsemanage-python-2.5-14.el7.x86_64.rpm | 113 kB 00:00:00 (9/26): libyaml-0.1.4-11.el7_0.x86_64.rpm | 55 kB 00:00:00 (10/26): oci-register-machine-0-6.git2b44233.el7.x86_64.rpm | 1.1 MB 00:00:00 (11/26): oci-systemd-hook-0.2.0-1.git05e6923.el7_6.x86_64.rpm | 34 kB 00:00:00 (12/26): oci-umount-2.5-3.el7.x86_64.rpm | 33 kB 00:00:00 (13/26): policycoreutils-python-2.5-33.el7.x86_64.rpm | 457 kB 00:00:00 (14/26): python-IPy-0.75-6.el7.noarch.rpm | 32 kB 00:00:00 (15/26): python-backports-1.0-8.el7.x86_64.rpm | 5.8 kB 00:00:00 (16/26): python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch.rpm | 13 kB 00:00:00 (17/26): python-ipaddress-1.0.16-2.el7.noarch.rpm | 34 kB 00:00:00 (18/26): python-pytoml-0.1.14-1.git7dea353.el7.noarch.rpm | 18 kB 00:00:00 (19/26): python-setuptools-0.9.8-7.el7.noarch.rpm | 397 kB 00:00:00 (20/26): setools-libs-3.3.8-4.el7.x86_64.rpm | 620 kB 00:00:00 (21/26): subscription-manager-rhsm-certificates-1.24.13-4.el7.centos.x86_64.rpm | 228 kB 00:00:00 (22/26): yajl-2.0.4-4.el7.x86_64.rpm | 39 kB 00:00:00 (23/26): checkpolicy-2.5-8.el7.x86_64.rpm | 295 kB 00:00:05 (24/26): PyYAML-3.10-11.el7.x86_64.rpm | 153 kB 00:00:05 (25/26): audit-libs-python-2.8.5-4.el7.x86_64.rpm | 76 kB 00:00:06 (26/26): libcgroup-0.41-21.el7.x86_64.rpm | 66 kB 00:00:10 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 2.0 MB/s | 25 MB 00:00:12 exiting because "Download Only" specified