LInux-CentOS7离线安装Docker
说明
- CentOS7离线安装Docker
操作步骤
》下载
docker依赖(rpm)下载:
依赖包
container-selinux-2.107-3.el7.noarch.rpm containerd.io-1.4.8-3.1.el7.x86_64.rpm docker-ce-20.10.8-3.el7.x86_64.rpm docker-ce-cli-20.10.8-3.el7.x86_64.rpm docker-ce-rootless-extras-20.10.8-3.el7.x86_64.rpm docker-scan-plugin-0.12.0-3.el7.x86_64.rpm
其他依赖包(rpm)下载:
依赖包
audit-libs-python-2.8.5-4.el7.x86_64.rpm checkpolicy-2.5-8.el7.x86_64.rpm libcgroup-0.41-21.el7.x86_64.rpm libseccomp-2.3.1-4.el7.x86_64.rpm libsemanage-python-2.5-14.el7.x86_64.rpm libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm policycoreutils-python-2.5-34.el7.x86_64.rpm python-IPy-0.75-6.el7.noarch.rpm setools-libs-3.3.8-4.el7.x86_64.rpm
依赖包:
pigz-2.3.3-1.el7.centos.x86_64.rpm
》安装
先安装其他依赖
[root@bogon packages]# ll total 1860 -rw-r--r--. 1 501 games 78256 Dec 18 18:24 audit-libs-python-2.8.5-4.el7.x86_64.rpm -rw-r--r--. 1 501 games 302068 Dec 18 18:25 checkpolicy-2.5-8.el7.x86_64.rpm -rw-r--r--. 1 501 games 67720 Dec 18 18:25 libcgroup-0.41-21.el7.x86_64.rpm -rw-r--r--. 1 501 games 57460 Dec 18 18:26 libseccomp-2.3.1-4.el7.x86_64.rpm -rw-r--r--. 1 501 games 115284 Dec 18 18:26 libsemanage-python-2.5-14.el7.x86_64.rpm -rw-r--r--. 1 501 games 50076 Dec 18 18:30 libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm -rw-r--r--. 1 501 games 69596 Dec 18 18:28 pigz-2.3.3-1.el7.centos.x86_64.rpm -rw-r--r--. 1 501 games 468316 Dec 18 18:22 policycoreutils-python-2.5-34.el7.x86_64.rpm -rw-r--r--. 1 501 games 32880 Dec 18 18:27 python-IPy-0.75-6.el7.noarch.rpm -rw-r--r--. 1 501 games 635184 Dec 18 18:27 setools-libs-3.3.8-4.el7.x86_64.rpm [root@bogon packages]# rpm -ivh *.rpm --nodeps --force Preparing... ################################# [100%] Updating / installing... 1:setools-libs-3.3.8-4.el7 ################################# [ 10%] 2:python-IPy-0.75-6.el7 ################################# [ 20%] 3:libsemanage-python-2.5-14.el7 ################################# [ 30%] 4:libcgroup-0.41-21.el7 ################################# [ 40%] 5:checkpolicy-2.5-8.el7 ################################# [ 50%] 6:audit-libs-python-2.8.5-4.el7 ################################# [ 60%] 7:policycoreutils-python-2.5-34.el7################################# [ 70%] 8:pigz-2.3.3-1.el7.centos ################################# [ 80%] 9:libtool-ltdl-2.4.2-22.el7_3 ################################# [ 90%] 10:libseccomp-2.3.1-4.el7 ################################# [100%]
在安装docker以及依赖
[root@bogon docker-packages]# ll total 98496 -rw-r--r--. 1 501 games 31283812 Dec 18 18:40 containerd.io-1.4.8-3.1.el7.x86_64.rpm -rw-r--r--. 1 501 games 40212 Dec 18 18:34 container-selinux-2.107-3.el7.noarch.rpm -rw-r--r--. 1 501 games 23782160 Dec 18 17:11 docker-ce-20.10.8-3.el7.x86_64.rpm -rw-r--r--. 1 501 games 30797096 Dec 18 17:12 docker-ce-cli-20.10.8-3.el7.x86_64.rpm -rw-r--r--. 1 501 games 8427608 Dec 18 18:39 docker-ce-rootless-extras-20.10.8-3.el7.x86_64.rpm -rw-r--r--. 1 501 games 3927304 Dec 18 18:39 docker-scan-plugin-0.12.0-3.el7.x86_64.rpm [root@bogon docker-packages]# rpm -ivh *.rpm --nodeps --force warning: containerd.io-1.4.8-3.1.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY Preparing... ################################# [100%] Updating / installing... 1:docker-scan-plugin-0:0.12.0-3.el7################################# [ 17%] 2:docker-ce-cli-1:20.10.8-3.el7 ################################# [ 33%] 3:container-selinux-2:2.107-3.el7 ################################# [ 50%] 4:containerd.io-1.4.8-3.1.el7 ################################# [ 67%] 5:docker-ce-rootless-extras-0:20.10################################# [ 83%] 6:docker-ce-3:20.10.8-3.el7 ################################# [100%]
启动并查看
[root@bogon docker-packages]# systemctl start docker [root@bogon docker-packages]# docker version Client: Docker Engine - Community Version: 20.10.8 API version: 1.41 Go version: go1.16.6 Git commit: 3967b7d Built: Fri Jul 30 19:55:49 2021 OS/Arch: linux/amd64 Context: default Experimental: true Server: 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:54:13 2021 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.4.8 GitCommit: 7eba5930496d9bbe375fdf71603e610ad737d2b2 runc: Version: 1.0.0 GitCommit: v1.0.0-0-g84113ee docker-init: Version: 0.19.0 GitCommit: de40ad0
备注
- 该教程部分内容收集自网络,感谢原作者。