Kubernetes 环境部署 docker离线包准备

网友投稿 1018 2022-11-30

Kubernetes 环境部署 docker离线包准备

Kubernetes 环境部署 docker离线包准备

在能联网的服务器上

1、安装yumdownloader

yumdownloader是什么:yumdownloader is a program for downloading RPMs from Yum repositories

安装:yum install yum-utils -y

2、获取docker安装包及依赖(test目录存放所有的离线包)​​​test]# yum list docker-ce --showduplicates | sort -rLast metadata expiration check: 0:00:01 ago on Mon 23 Aug 2021 11:09:52 AM CST.docker-ce.x86_64 3:20.10.8-3.el8 docker-ce-stabledocker-ce.x86_64 3:20.10.7-3.el8 docker-ce-stabledocker-ce.x86_64 3:20.10.6-3.el8 docker-ce-stabledocker-ce.x86_64 3:20.10.5-3.el8 docker-ce-stabledocker-ce.x86_64 3:20.10.4-3.el8 docker-ce-stabledocker-ce.x86_64 3:20.10.3-3.el8 docker-ce-stabledocker-ce.x86_64 3:20.10.2-3.el8 docker-ce-stabledocker-ce.x86_64 3:20.10.1-3.el8 docker-ce-stabledocker-ce.x86_64 3:20.10.0-3.el8 docker-ce-stabledocker-ce.x86_64 3:19.03.15-3.el8 docker-ce-stabledocker-ce.x86_64 3:19.03.14-3.el8 docker-ce-stabledocker-ce.x86_64 3:19.03.13-3.el8 docker-ce-stableDocker CE Stable - x86_64 24 kB/s | 15 kB 00:00 Available Packages[root@master01 test]# yumdownloader --resolve --destdir . docker-ceLast metadata expiration check: 0:09:55 ago on Mon 23 Aug 2021 11:09:52 AM CST.[SKIPPED] docker-ce-20.10.8-3.el8.x86_64.rpm: Already downloaded [SKIPPED] libsemanage-2.9-6.el8.x86_64.rpm: Already downloaded [SKIPPED] fuse-common-3.2.1-12.el8.x86_64.rpm: Already downloaded [SKIPPED] fuse3-3.2.1-12.el8.x86_64.rpm: Already downloaded [SKIPPED] docker-ce-cli-20.10.8-3.el8.x86_64.rpm: Already downloaded [SKIPPED] fuse3-libs-3.2.1-12.el8.x86_64.rpm: Already downloaded [SKIPPED] docker-ce-rootless-extras-20.10.8-3.el8.x86_64.rpm: Already downloaded [SKIPPED] docker-scan-plugin-0.8.0-3.el8.x86_64.rpm: Already downloaded [SKIPPED] python3-libsemanage-2.9-6.el8.x86_64.rpm: Already downloaded [SKIPPED] libcgroup-0.41-19.el8.x86_64.rpm: Already downloaded [SKIPPED] slirp4netns-1.1.8-1.module_el8.4.0+641+6116a774.x86_64.rpm: Already downloaded [SKIPPED] python3-policycoreutils-2.9-14.el8.noarch.rpm: Already downloaded [SKIPPED] container-selinux-2.164.1-1.module_el8.4.0+886+c9a8d9ad.noarch.rpm: Already downloaded [SKIPPED] python3-setools-4.3.0-2.el8.x86_64.rpm: Already downloaded [SKIPPED] policycoreutils-2.9-14.el8.x86_64.rpm: Already downloaded [SKIPPED] policycoreutils-python-utils-2.9-14.el8.noarch.rpm: Already downloaded [SKIPPED] checkpolicy-2.9-1.el8.x86_64.rpm: Already downloaded [SKIPPED] libslirp-4.3.1-1.module_el8.4.0+575+63b40ad7.x86_64.rpm: Already downloaded [SKIPPED] tar-1.30-5.el8.x86_64.rpm: Already downloaded [SKIPPED] fuse-overlayfs-1.6-1.module_el8.4.0+886+c9a8d9ad.x86_64.rpm: Already downloaded [SKIPPED] python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64.rpm: Already downloaded [SKIPPED] containerd.io-1.4.9-3.1.el8.x86_64.rpm: Already downloaded

安装一些Linux操作系统所需要的依赖

[root@master01 test]# yumdownloader --resolve --destdir . chrony bind-utils nfs-utils net-tools ipvsadm curl openssl socat conntrack ebtables ipset telnet[root@master01 test]# lsbind-libs-9.11.26-4.el8_4.x86_64.rpm gssproxy-0.8.0-19.el8.x86_64.rpm policycoreutils-2.9-14.el8.x86_64.rpmbind-libs-lite-9.11.26-4.el8_4.x86_64.rpm ipset-7.1-1.el8.x86_64.rpm policycoreutils-python-utils-2.9-14.el8.noarch.rpmbind-license-9.11.26-4.el8_4.noarch.rpm iptables-1.8.4-17.el8.x86_64.rpm protobuf-c-1.3.0-6.el8.x86_64.rpmbind-utils-9.11.26-4.el8_4.x86_64.rpm iptables-ebtables-1.8.4-17.el8.x86_64.rpm python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64.rpmcheckpolicy-2.9-1.el8.x86_64.rpm iptables-libs-1.8.4-17.el8.x86_64.rpm python3-bind-9.11.26-4.el8_4.noarch.rpmchrony-3.5-2.el8.x86_64.rpm ipvsadm-1.31-1.el8.x86_64.rpm python3-libsemanage-2.9-6.el8.x86_64.rpmconntrack-tools-1.4.4-10.el8.x86_64.rpm keyutils-1.5.10-6.el8.x86_64.rpm python3-ply-3.9-9.el8.noarch.rpmcontainerd.io-1.4.9-3.1.el8.x86_64.rpm libcgroup-0.41-19.el8.x86_64.rpm python3-policycoreutils-2.9-14.el8.noarch.rpmcontainer-selinux-2.164.1-1.module_el8.4.0+886+c9a8d9ad.noarch.rpm libcurl-7.61.1-18.el8.x86_64.rpm python3-pyyaml-3.12-12.el8.x86_64.rpmcurl-7.61.1-18.el8.x86_64.rpm libnetfilter_cthelper-1.0.0-15.el8.x86_64.rpm python3-setools-4.3.0-2.el8.x86_64.rpmdocker-ce-20.10.8-3.el8.x86_64.rpm libnetfilter_cttimeout-1.0.0-11.el8.x86_64.rpm quota-4.04-12.el8.x86_64.rpmdocker-ce-cli-20.10.8-3.el8.x86_64.rpm libnetfilter_queue-1.0.4-3.el8.x86_64.rpm quota-nls-4.04-12.el8.noarch.rpmdocker-ce-rootless-extras-20.10.8-3.el8.x86_64.rpm libsemanage-2.9-6.el8.x86_64.rpm rpcbind-1.2.5-8.el8.x86_64.rpmdocker-scan-plugin-0.8.0-3.el8.x86_64.rpm libslirp-4.3.1-1.module_el8.4.0+575+63b40ad7.x86_64.rpm slirp4netns-1.1.8-1.module_el8.4.0+641+6116a774.x86_64.rpmfstrm-0.6.0-3.el8.1.x86_64.rpm libverto-libevent-0.3.0-5.el8.x86_64.rpm socat-1.7.3.3-2.el8.x86_64.rpmfuse3-3.2.1-12.el8.x86_64.rpm net-tools-2.0-0.52.20160912git.el8.x86_64.rpm tar-1.30-5.el8.x86_64.rpmfuse3-libs-3.2.1-12.el8.x86_64.rpm nfs-utils-2.3.3-41.el8_4.2.x86_64.rpm telnet-0.17-76.el8.x86_64.rpmfuse-common-3.2.1-12.el8.x86_64.rpm openssl-1.1.1g-15.el8_3.x86_64.rpm timedatex-0.5-3.el8.x86_64.rpmfuse-overlayfs-1.6-1.module_el8.4.0+886+c9a8d9ad.x86_64.rpm openssl-libs-1.1.1g-15.el8_3.x86_64.rpm

3.安装本地离线包

[root@master01 ~]# tar czf rpm.tar.gz test[root@master01 ~]# lsrpm.tar.gz test

在其他离线环境就可以使用这个包安装了

[root@master01 ~]# yum localinstall *.rpm

[root@master01 test]# systemctl start docker[root@master01 test]# docker versionClient: Docker Engine - Community Version: 20.10.8 API version: 1.41 Go version: go1.16.6 Git commit: 3967b7d Built: Fri Jul 30 19:53:39 2021 OS/Arch: linux/amd64 Context: default Experimental: trueServer: Docker Engine - Community Engine: Version: 20.10.8 API version: 1.41 (minimum version 1.12) Go version: go1.16.6 Git commit: 75249d8 Built: Fri Jul 30 19:52:00 2021 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.4.9 GitCommit: e25210fe30a0a703442421b0f60afac609f950a3 runc: Version: 1.0.1 GitCommit: v1.0.1-0-g4144b63 docker-init: Version: 0.19.0 GitCommit: de40ad0

这样在离线情况下docker环境就准备好了

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:GitLabCI/CD 基础入门 Runner注册配置使用
下一篇:Jenkins 进阶04 Generic Webhook GitLab 触发器与提交流水线
相关文章

 发表评论

暂时没有评论,来抢沙发吧~