1.在可联网机器上,使用默认centosyum源
[root@kole ~]# pwd /root [root@kole ~]# [root@kole ~]# cd docker/ [root@kole docker]# yum install --downloadonly --downloaddir=/root/docker docker [root@kole docker]# ll total 38800 -rw-r--r-- 1 root root 35780 Oct 2 00:52 atomic-registries-1.22.1-25.git5a342e3.el7.centos.x86_64.rpm -rw-r--r-- 1 root root 36688 Aug 22 03:48 container-selinux-2.68-1.el7.noarch.rpm -rw-r--r-- 1 root root 35364 Aug 22 03:48 container-storage-setup-0.11.0-2.git5eaf76c.el7.noarch.rpm -rw-r--r-- 1 root root 17138052 Oct 2 00:52 docker-1.13.1-75.git8633870.el7.centos.x86_64.rpm -rw-r--r-- 1 root root 4013036 Oct 2 00:52 docker-client-1.13.1-75.git8633870.el7.centos.x86_64.rpm -rw-r--r-- 1 root root 95016 Oct 2 00:52 docker-common-1.13.1-75.git8633870.el7.centos.x86_64.rpm -rw-r--r-- 1 root root 94468 Sep 28 19:33 libgudev1-219-57.el7_5.3.x86_64.rpm -rw-r--r-- 1 root root 165680 Apr 26 2018 libselinux-2.5-12.el7.x86_64.rpm -rw-r--r-- 1 root root 240876 Apr 26 2018 libselinux-python-2.5-12.el7.x86_64.rpm -rw-r--r-- 1 root root 154984 Apr 26 2018 libselinux-utils-2.5-12.el7.x86_64.rpm -rw-r--r-- 1 root root 153596 Apr 25 2018 libsemanage-2.5-11.el7.x86_64.rpm -rw-r--r-- 1 root root 114804 Apr 25 2018 libsemanage-python-2.5-11.el7.x86_64.rpm -rw-r--r-- 1 root root 303736 Apr 25 2018 libsepol-2.5-8.1.el7.x86_64.rpm -rw-r--r-- 1 root root 56068 Jan 30 2015 libyaml-0.1.4-11.el7_0.x86_64.rpm -rw-r--r-- 1 root root 100668 Apr 25 2018 lz4-1.7.5-2.el7.x86_64.rpm -rw-r--r-- 1 root root 1109112 Mar 9 2018 oci-register-machine-0-6.git2b44233.el7.x86_64.rpm -rw-r--r-- 1 root root 33860 Aug 22 03:48 oci-systemd-hook-0.1.17-2.git83283a0.el7.x86_64.rpm -rw-r--r-- 1 root root 32440 Mar 9 2018 oci-umount-2.3.3-3.gite3c9055.el7.x86_64.rpm -rw-r--r-- 1 root root 887548 Apr 25 2018 policycoreutils-2.5-22.el7.x86_64.rpm -rw-r--r-- 1 root root 464972 Apr 25 2018 policycoreutils-python-2.5-22.el7.x86_64.rpm -rw-r--r-- 1 root root 18692 Nov 29 2017 python-pytoml-0.1.14-1.git7dea353.el7.noarch.rpm -rw-r--r-- 1 root root 156952 Jul 4 2014 PyYAML-3.10-11.el7.x86_64.rpm -rw-r--r-- 1 root root 463888 Aug 20 22:19 selinux-policy-3.13.1-192.el7_5.6.noarch.rpm -rw-r--r-- 1 root root 6881288 Aug 20 22:20 selinux-policy-targeted-3.13.1-192.el7_5.6.noarch.rpm -rw-r--r-- 1 root root 634220 Apr 25 2018 setools-libs-3.3.8-2.el7.x86_64.rpm -rw-r--r-- 1 root root 17100 Jul 18 01:18 skopeo-containers-0.1.31-1.dev.gitae64ff7.el7.centos.x86_64.rpm -rw-r--r-- 1 root root 200128 Apr 25 2018 subscription-manager-rhsm-certificates-1.20.11-1.el7.centos.x86_64.rpm -rw-r--r-- 1 root root 5278020 Sep 28 19:34 systemd-219-57.el7_5.3.x86_64.rpm -rw-r--r-- 1 root root 411908 Sep 28 19:34 systemd-libs-219-57.el7_5.3.x86_64.rpm -rw-r--r-- 1 root root 131556 Sep 28 19:34 systemd-python-219-57.el7_5.3.x86_64.rpm -rw-r--r-- 1 root root 81520 Sep 28 19:34 systemd-sysv-219-57.el7_5.3.x86_64.rpm [root@kole docker]# createrepo . [root@kole ~]# tar -czvf docker.tar.gz docker
2.离线机器安装docker
[root@kole docker]# tar -zxvf docker.tar.gz [root@kole docker]# ll total 36648 drwxr-xr-x 3 root 0 4096 Dec 3 20:36 docker -rw-r--r-- 1 root 0 37521067 Dec 3 20:15 docker.tar.gz [root@kole docker]# cd docker/ [root@kole docker]# ll total 8888800 -rw-r--r-- 1 root 0 35780 Oct 1 12:52 atomic-registries-1.22.1-25.git5a342e3.el7.centos.x86_64.rpm -rw-r--r-- 1 root 0 9062522880 Dec 3 20:45 centos7-base.tar -rw-r--r-- 1 root 0 36688 Aug 21 15:48 container-selinux-2.68-1.el7.noarch.rpm -rw-r--r-- 1 root 0 35364 Aug 21 15:48 container-storage-setup-0.11.0-2.git5eaf76c.el7.noarch.rpm -rw-r--r-- 1 root 0 17138052 Oct 1 12:52 docker-1.13.1-75.git8633870.el7.centos.x86_64.rpm -rw-r--r-- 1 root 0 4013036 Oct 1 12:52 docker-client-1.13.1-75.git8633870.el7.centos.x86_64.rpm -rw-r--r-- 1 root 0 95016 Oct 1 12:52 docker-common-1.13.1-75.git8633870.el7.centos.x86_64.rpm -rw-r--r-- 1 root 0 94468 Sep 28 07:33 libgudev1-219-57.el7_5.3.x86_64.rpm -rw-r--r-- 1 root 0 165680 Apr 26 2018 libselinux-2.5-12.el7.x86_64.rpm -rw-r--r-- 1 root 0 240876 Apr 26 2018 libselinux-python-2.5-12.el7.x86_64.rpm -rw-r--r-- 1 root 0 154984 Apr 26 2018 libselinux-utils-2.5-12.el7.x86_64.rpm -rw-r--r-- 1 root 0 153596 Apr 25 2018 libsemanage-2.5-11.el7.x86_64.rpm -rw-r--r-- 1 root 0 114804 Apr 25 2018 libsemanage-python-2.5-11.el7.x86_64.rpm -rw-r--r-- 1 root 0 303736 Apr 25 2018 libsepol-2.5-8.1.el7.x86_64.rpm -rw-r--r-- 1 root 0 56068 Jan 29 2015 libyaml-0.1.4-11.el7_0.x86_64.rpm -rw-r--r-- 1 root 0 100668 Apr 25 2018 lz4-1.7.5-2.el7.x86_64.rpm -rw-r--r-- 1 root 0 1109112 Mar 9 2018 oci-register-machine-0-6.git2b44233.el7.x86_64.rpm -rw-r--r-- 1 root 0 33860 Aug 21 15:48 oci-systemd-hook-0.1.17-2.git83283a0.el7.x86_64.rpm -rw-r--r-- 1 root 0 32440 Mar 9 2018 oci-umount-2.3.3-3.gite3c9055.el7.x86_64.rpm -rw-r--r-- 1 root 0 887548 Apr 25 2018 policycoreutils-2.5-22.el7.x86_64.rpm -rw-r--r-- 1 root 0 464972 Apr 25 2018 policycoreutils-python-2.5-22.el7.x86_64.rpm -rw-r--r-- 1 root 0 18692 Nov 28 2017 python-pytoml-0.1.14-1.git7dea353.el7.noarch.rpm -rw-r--r-- 1 root 0 156952 Jul 4 2014 PyYAML-3.10-11.el7.x86_64.rpm drwxr-xr-x 2 root 0 4096 Dec 3 04:54 repodata -rw-r--r-- 1 root 0 463888 Aug 20 10:19 selinux-policy-3.13.1-192.el7_5.6.noarch.rpm -rw-r--r-- 1 root 0 6881288 Aug 20 10:20 selinux-policy-targeted-3.13.1-192.el7_5.6.noarch.rpm -rw-r--r-- 1 root 0 634220 Apr 25 2018 setools-libs-3.3.8-2.el7.x86_64.rpm -rw-r--r-- 1 root 0 17100 Jul 17 13:18 skopeo-containers-0.1.31-1.dev.gitae64ff7.el7.centos.x86_64.rpm -rw-r--r-- 1 root 0 200128 Apr 25 2018 subscription-manager-rhsm-certificates-1.20.11-1.el7.centos.x86_64.rpm -rw-r--r-- 1 root 0 5278020 Sep 28 07:34 systemd-219-57.el7_5.3.x86_64.rpm -rw-r--r-- 1 root 0 411908 Sep 28 07:34 systemd-libs-219-57.el7_5.3.x86_64.rpm -rw-r--r-- 1 root 0 131556 Sep 28 07:34 systemd-python-219-57.el7_5.3.x86_64.rpm -rw-r--r-- 1 root 0 81520 Sep 28 07:34 systemd-sysv-219-57.el7_5.3.x86_64.rpm [root@kole docker]# cat /etc/yum.repos.d/local.repo [local] name=local baseurl=file:///mnt enabled=1 gpgcheck=0 [docker] name=docker baseurl=file:///root/docker/docker enabled=1 gpgcheck=0 [root@kole docker]# yum install -y docker
总结
以上所述是小编给大家介绍的yum下载docker安装包安装到离线机器的实例代码详解,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
暂无评论...
更新日志
2024年12月23日
2024年12月23日
- 小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE]
- 群星《欢迎来到我身边 电影原声专辑》[320K/MP3][105.02MB]
- 群星《欢迎来到我身边 电影原声专辑》[FLAC/分轨][480.9MB]
- 雷婷《梦里蓝天HQⅡ》 2023头版限量编号低速原抓[WAV+CUE][463M]
- 群星《2024好听新歌42》AI调整音效【WAV分轨】
- 王思雨-《思念陪着鸿雁飞》WAV
- 王思雨《喜马拉雅HQ》头版限量编号[WAV+CUE]
- 李健《无时无刻》[WAV+CUE][590M]
- 陈奕迅《酝酿》[WAV分轨][502M]
- 卓依婷《化蝶》2CD[WAV+CUE][1.1G]
- 群星《吉他王(黑胶CD)》[WAV+CUE]
- 齐秦《穿乐(穿越)》[WAV+CUE]
- 发烧珍品《数位CD音响测试-动向效果(九)》【WAV+CUE】
- 邝美云《邝美云精装歌集》[DSF][1.6G]
- 吕方《爱一回伤一回》[WAV+CUE][454M]