2021年8月3日,Docker发布了最新社区版-20.10.8。
官方下载地址(For Redhat / CentOS 7.x):
https://download.docker.com/linux/centos/7/x86_64/stable/Packages/
# 官方下载的rpm安装包
[root@docker-ce dockerce]# ls -ltr
总用量 96412
-rw-r--r--. 1 root root 23782160 8月 6 08:23 docker-ce-20.10.8-3.el7.x86_64.rpm
-rw-r--r--. 1 root root 31304280 8月 6 08:23 containerd.io-1.4.9-3.1.el7.x86_64.rpm
-rw-r--r--. 1 root root 30797096 8月 6 08:24 docker-ce-cli-20.10.8-3.el7.x86_64.rpm
-rw-r--r--. 1 root root 8427608 8月 6 08:24 docker-ce-rootless-extras-20.10.8-3.el7.x86_64.rpm
-rw-r--r--. 1 root root 29392 8月 6 08:24 docker-ce-selinux-17.03.3.ce-1.el7.noarch.rpm
-rw-r--r--. 1 root root 4373740 8月 6 08:24 docker-scan-plugin-0.8.0-3.el7.x86_64.rpm
# 删除docker-ce-selinux(与container-selinux冲突)
[root@docker-ce dockerce]# rm -f docker-ce-selinux-17.03.3.ce-1.el7.noarch.rpm
# 上传container-selinux
[root@docker-ce dockerce]# rz
rz waiting to receive.
Starting zmodem transfer. Press Ctrl+C to cancel.
Transferring container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm...
100% 39 KB 39 KB/sec 00:00:01 0 Errors
# 下载其他依赖包
[root@docker-ce dockerce]# yum install *.rpm --downloadonly --downloaddir=./
已加载插件:fastestmirror
正在检查 containerd.io-1.4.9-3.1.el7.x86_64.rpm: containerd.io-1.4.9-3.1.el7.x86_64
containerd.io-1.4.9-3.1.el7.x86_64.rpm 将被安装
正在检查 container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm: 2:container-selinux-2.119.2-1.911c772.el7_8.noarch
container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm 将被安装
正在检查 docker-ce-20.10.8-3.el7.x86_64.rpm: 3:docker-ce-20.10.8-3.el7.x86_64
docker-ce-20.10.8-3.el7.x86_64.rpm 将被安装
正在检查 docker-ce-cli-20.10.8-3.el7.x86_64.rpm: 1:docker-ce-cli-20.10.8-3.el7.x86_64
docker-ce-cli-20.10.8-3.el7.x86_64.rpm 将被安装
正在检查 docker-ce-rootless-extras-20.10.8-3.el7.x86_64.rpm: docker-ce-rootless-extras-20.10.8-3.el7.x86_64
docker-ce-rootless-extras-20.10.8-3.el7.x86_64.rpm 将被安装
正在检查 docker-scan-plugin-0.8.0-3.el7.x86_64.rpm: docker-scan-plugin-0.8.0-3.el7.x86_64
docker-scan-plugin-0.8.0-3.el7.x86_64.rpm 将被安装
正在解决依赖关系
--> 正在检查事务
---> 软件包 container-selinux.noarch.2.2.119.2-1.911c772.el7_8 将被 安装
--> 正在处理依赖关系 policycoreutils-python,它被软件包 2:container-selinux-2.119.2-1.911c772.el7_8.noarch 需要
Loading mirror speeds from cached hostfile
* base: mirrors.huaweicloud.com
* extras: mirrors.huaweicloud.com
* updates: mirrors.icidc.com
---> 软件包 containerd.io.x86_64.0.1.4.9-3.1.el7 将被 安装
---> 软件包 docker-ce.x86_64.3.20.10.8-3.el7 将被 安装
--> 正在处理依赖关系 libcgroup,它被软件包 3:docker-ce-20.10.8-3.el7.x86_64 需要
---> 软件包 docker-ce-cli.x86_64.1.20.10.8-3.el7 将被 安装
---> 软件包 docker-ce-rootless-extras.x86_64.0.20.10.8-3.el7 将被 安装
--> 正在处理依赖关系 fuse-overlayfs >= 0.7,它被软件包 docker-ce-rootless-extras-20.10.8-3.el7.x86_64 需要
--> 正在处理依赖关系 slirp4netns >= 0.4,它被软件包 docker-ce-rootless-extras-20.10.8-3.el7.x86_64 需要
---> 软件包 docker-scan-plugin.x86_64.0.0.8.0-3.el7 将被 安装
--> 正在检查事务
---> 软件包 fuse-overlayfs.x86_64.0.0.7.2-6.el7_8 将被 安装
--> 正在处理依赖关系 libfuse3.so.3(FUSE_3.2)(64bit),它被软件包 fuse-overlayfs-0.7.2-6.el7_8.x86_64 需要
--> 正在处理依赖关系 libfuse3.so.3(FUSE_3.0)(64bit),它被软件包 fuse-overlayfs-0.7.2-6.el7_8.x86_64 需要
--> 正在处理依赖关系 libfuse3.so.3()(64bit),它被软件包 fuse-overlayfs-0.7.2-6.el7_8.x86_64 需要
---> 软件包 libcgroup.x86_64.0.0.41-21.el7 将被 安装
---> 软件包 policycoreutils-python.x86_64.0.2.5-34.el7 将被 安装
--> 正在处理依赖关系 setools-libs >= 3.3.8-4,它被软件包 policycoreutils-python-2.5-34.el7.x86_64 需要
--> 正在处理依赖关系 libsemanage-python >= 2.5-14,它被软件包 policycoreutils-python-2.5-34.el7.x86_64 需要
--> 正在处理依赖关系 audit-libs-python >= 2.1.3-4,它被软件包 policycoreutils-python-2.5-34.el7.x86_64 需要
--> 正在处理依赖关系 python-IPy,它被软件包 policycoreutils-python-2.5-34.el7.x86_64 需要
--> 正在处理依赖关系 libqpol.so.1(VERS_1.4)(64bit),它被软件包 policycoreutils-python-2.5-34.el7.x86_64 需要
--> 正在处理依赖关系 libqpol.so.1(VERS_1.2)(64bit),它被软件包 policycoreutils-python-2.5-34.el7.x86_64 需要
--> 正在处理依赖关系 libapol.so.4(VERS_4.0)(64bit),它被软件包 policycoreutils-python-2.5-34.el7.x86_64 需要
--> 正在处理依赖关系 checkpolicy,它被软件包 policycoreutils-python-2.5-34.el7.x86_64 需要
--> 正在处理依赖关系 libqpol.so.1()(64bit),它被软件包 policycoreutils-python-2.5-34.el7.x86_64 需要
--> 正在处理依赖关系 libapol.so.4()(64bit),它被软件包 policycoreutils-python-2.5-34.el7.x86_64 需要
---> 软件包 slirp4netns.x86_64.0.0.4.3-4.el7_8 将被 安装
--> 正在检查事务
---> 软件包 audit-libs-python.x86_64.0.2.8.5-4.el7 将被 安装
---> 软件包 checkpolicy.x86_64.0.2.5-8.el7 将被 安装
---> 软件包 fuse3-libs.x86_64.0.3.6.1-4.el7 将被 安装
---> 软件包 libsemanage-python.x86_64.0.2.5-14.el7 将被 安装
---> 软件包 python-IPy.noarch.0.0.75-6.el7 将被 安装
---> 软件包 setools-libs.x86_64.0.3.3.8-4.el7 将被 安装
--> 解决依赖关系完成
依赖关系解决
============================================================================================================================================================================================================================================
Package 架构 版本 源 大小
============================================================================================================================================================================================================================================
正在安装:
container-selinux noarch 2:2.119.2-1.911c772.el7_8 /container-selinux-2.119.2-1.911c772.el7_8.noarch 41 k
containerd.io x86_64 1.4.9-3.1.el7 /containerd.io-1.4.9-3.1.el7.x86_64 112 M
docker-ce x86_64 3:20.10.8-3.el7 /docker-ce-20.10.8-3.el7.x86_64 96 M
docker-ce-cli x86_64 1:20.10.8-3.el7 /docker-ce-cli-20.10.8-3.el7.x86_64 139 M
docker-ce-rootless-extras x86_64 20.10.8-3.el7 /docker-ce-rootless-extras-20.10.8-3.el7.x86_64 19 M
docker-scan-plugin x86_64 0.8.0-3.el7 /docker-scan-plugin-0.8.0-3.el7.x86_64 13 M
为依赖而安装:
audit-libs-python x86_64 2.8.5-4.el7 base 76 k
checkpolicy x86_64 2.5-8.el7 base 295 k
fuse-overlayfs x86_64 0.7.2-6.el7_8 extras 54 k
fuse3-libs x86_64 3.6.1-4.el7 extras 82 k
libcgroup x86_64 0.41-21.el7 base 66 k
libsemanage-python x86_64 2.5-14.el7 base 113 k
policycoreutils-python x86_64 2.5-34.el7 base 457 k
python-IPy noarch 0.75-6.el7 base 32 k
setools-libs x86_64 3.3.8-4.el7 base 620 k
slirp4netns x86_64 0.4.3-4.el7_8 extras 81 k
事务概要
============================================================================================================================================================================================================================================
安装 6 软件包 (+10 依赖软件包)
总计:382 M
总下载量:1.8 M
安装大小:386 M
Background downloading packages, then exiting:
(1/10): audit-libs-python-2.8.5-4.el7.x86_64.rpm | 76 kB 00:00:00
(2/10): libsemanage-python-2.5-14.el7.x86_64.rpm | 113 kB 00:00:00
(3/10): fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm | 54 kB 00:00:00
(4/10): libcgroup-0.41-21.el7.x86_64.rpm | 66 kB 00:00:00
(5/10): checkpolicy-2.5-8.el7.x86_64.rpm | 295 kB 00:00:00
(6/10): python-IPy-0.75-6.el7.noarch.rpm | 32 kB 00:00:00
(7/10): fuse3-libs-3.6.1-4.el7.x86_64.rpm | 82 kB 00:00:00
(8/10): policycoreutils-python-2.5-34.el7.x86_64.rpm | 457 kB 00:00:00
(9/10): setools-libs-3.3.8-4.el7.x86_64.rpm | 620 kB 00:00:00
(10/10): slirp4netns-0.4.3-4.el7_8.x86_64.rpm | 81 kB 00:00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
总计 2.7 MB/s | 1.8 MB 00:00:00
exiting because "Download Only" specified
[root@docker-ce dockerce]# ls -ltr
总用量 98324
-rw-r--r--. 1 root root 32880 7月 4 2014 python-IPy-0.75-6.el7.noarch.rpm
-rw-r--r--. 1 root root 302068 11月 12 2018 checkpolicy-2.5-8.el7.x86_64.rpm
-rw-r--r--. 1 root root 115284 11月 12 2018 libsemanage-python-2.5-14.el7.x86_64.rpm
-rw-r--r--. 1 root root 635184 11月 12 2018 setools-libs-3.3.8-4.el7.x86_64.rpm
-rw-r--r--. 1 root root 78256 8月 23 2019 audit-libs-python-2.8.5-4.el7.x86_64.rpm
-rw-r--r--. 1 root root 67720 8月 23 2019 libcgroup-0.41-21.el7.x86_64.rpm
-rw-r--r--. 1 root root 468316 4月 4 2020 policycoreutils-python-2.5-34.el7.x86_64.rpm
-rw-r--r--. 1 root root 55796 4月 29 2020 fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm
-rw-r--r--. 1 root root 83764 4月 29 2020 fuse3-libs-3.6.1-4.el7.x86_64.rpm
-rw-r--r--. 1 root root 83452 4月 29 2020 slirp4netns-0.4.3-4.el7_8.x86_64.rpm
-rw-r--r--. 1 root root 40816 7月 6 2020 container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm
-rw-r--r--. 1 root root 23782160 8月 6 08:23 docker-ce-20.10.8-3.el7.x86_64.rpm
-rw-r--r--. 1 root root 31304280 8月 6 08:23 containerd.io-1.4.9-3.1.el7.x86_64.rpm
-rw-r--r--. 1 root root 30797096 8月 6 08:24 docker-ce-cli-20.10.8-3.el7.x86_64.rpm
-rw-r--r--. 1 root root 8427608 8月 6 08:24 docker-ce-rootless-extras-20.10.8-3.el7.x86_64.rpm
-rw-r--r--. 1 root root 4373740 8月 6 08:24 docker-scan-plugin-0.8.0-3.el7.x86_64.rpm
[root@docker-ce dockerce]# rz *.rpm
rz: garbage on commandline
Try `rz --help' for more information.
[root@docker-ce dockerce]# sz *
rz
Starting zmodem transfer. Press Ctrl+C to cancel.
Transferring audit-libs-python-2.8.5-4.el7.x86_64.rpm...
100% 76 KB 76 KB/sec 00:00:01 0 Errors
Transferring checkpolicy-2.5-8.el7.x86_64.rpm...
100% 294 KB 294 KB/sec 00:00:01 0 Errors
Transferring containerd.io-1.4.9-3.1.el7.x86_64.rpm...
100% 30570 KB 30570 KB/sec 00:00:01 0 Errors
Transferring container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm...
100% 39 KB 39 KB/sec 00:00:01 0 Errors
Transferring docker-ce-20.10.8-3.el7.x86_64.rpm...
100% 23224 KB 23224 KB/sec 00:00:01 0 Errors
Transferring docker-ce-cli-20.10.8-3.el7.x86_64.rpm...
100% 30075 KB 30075 KB/sec 00:00:01 0 Errors
Transferring docker-ce-rootless-extras-20.10.8-3.el7.x86_64.rpm...
100% 8230 KB 8230 KB/sec 00:00:01 0 Errors
Transferring docker-scan-plugin-0.8.0-3.el7.x86_64.rpm...
100% 4271 KB 4271 KB/sec 00:00:01 0 Errors
Transferring fuse3-libs-3.6.1-4.el7.x86_64.rpm...
100% 81 KB 81 KB/sec 00:00:01 0 Errors
Transferring fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm...
100% 54 KB 54 KB/sec 00:00:01 0 Errors
Transferring libcgroup-0.41-21.el7.x86_64.rpm...
100% 66 KB 66 KB/sec 00:00:01 0 Errors
Transferring libsemanage-python-2.5-14.el7.x86_64.rpm...
100% 112 KB 112 KB/sec 00:00:01 0 Errors
Transferring policycoreutils-python-2.5-34.el7.x86_64.rpm...
100% 457 KB 457 KB/sec 00:00:01 0 Errors
Transferring python-IPy-0.75-6.el7.noarch.rpm...
100% 32 KB 32 KB/sec 00:00:01 0 Errors
Transferring setools-libs-3.3.8-4.el7.x86_64.rpm...
100% 620 KB 620 KB/sec 00:00:01 0 Errors
Transferring slirp4netns-0.4.3-4.el7_8.x86_64.rpm...
100% 81 KB 81 KB/sec 00:00:01 0 Errors
# 包总数:16个
[root@docker-ce dockerce]# ls -ltr
总用量 98324
-rw-r--r--. 1 root root 32880 7月 4 2014 python-IPy-0.75-6.el7.noarch.rpm
-rw-r--r--. 1 root root 302068 11月 12 2018 checkpolicy-2.5-8.el7.x86_64.rpm
-rw-r--r--. 1 root root 115284 11月 12 2018 libsemanage-python-2.5-14.el7.x86_64.rpm
-rw-r--r--. 1 root root 635184 11月 12 2018 setools-libs-3.3.8-4.el7.x86_64.rpm
-rw-r--r--. 1 root root 78256 8月 23 2019 audit-libs-python-2.8.5-4.el7.x86_64.rpm
-rw-r--r--. 1 root root 67720 8月 23 2019 libcgroup-0.41-21.el7.x86_64.rpm
-rw-r--r--. 1 root root 468316 4月 4 2020 policycoreutils-python-2.5-34.el7.x86_64.rpm
-rw-r--r--. 1 root root 55796 4月 29 2020 fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm
-rw-r--r--. 1 root root 83764 4月 29 2020 fuse3-libs-3.6.1-4.el7.x86_64.rpm
-rw-r--r--. 1 root root 83452 4月 29 2020 slirp4netns-0.4.3-4.el7_8.x86_64.rpm
-rw-r--r--. 1 root root 40816 7月 6 2020 container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm
-rw-r--r--. 1 root root 23782160 8月 6 08:23 docker-ce-20.10.8-3.el7.x86_64.rpm
-rw-r--r--. 1 root root 31304280 8月 6 08:23 containerd.io-1.4.9-3.1.el7.x86_64.rpm
-rw-r--r--. 1 root root 30797096 8月 6 08:24 docker-ce-cli-20.10.8-3.el7.x86_64.rpm
-rw-r--r--. 1 root root 8427608 8月 6 08:24 docker-ce-rootless-extras-20.10.8-3.el7.x86_64.rpm
-rw-r--r--. 1 root root 4373740 8月 6 08:24 docker-scan-plugin-0.8.0-3.el7.x86_64.rpm
# 安装
[root@docker-ce dockerce]# rpm -ivh *.rpm
警告:containerd.io-1.4.9-3.1.el7.x86_64.rpm: 头V4 RSA/SHA512 Signature, 密钥 ID 621e9f35: NOKEY
准备中... ################################# [100%]
正在升级/安装...
1:docker-scan-plugin-0:0.8.0-3.el7 ################################# [ 6%]
2:docker-ce-cli-1:20.10.8-3.el7 ################################# [ 13%]
3:libcgroup-0.41-21.el7 ################################# [ 19%]
4:slirp4netns-0.4.3-4.el7_8 ################################# [ 25%]
5:setools-libs-3.3.8-4.el7 ################################# [ 31%]
6:python-IPy-0.75-6.el7 ################################# [ 38%]
7:libsemanage-python-2.5-14.el7 ################################# [ 44%]
8:fuse3-libs-3.6.1-4.el7 ################################# [ 50%]
9:fuse-overlayfs-0.7.2-6.el7_8 ################################# [ 56%]
10:checkpolicy-2.5-8.el7 ################################# [ 63%]
11:audit-libs-python-2.8.5-4.el7 ################################# [ 69%]
12:policycoreutils-python-2.5-34.el7################################# [ 75%]
13:container-selinux-2:2.119.2-1.911################################# [ 81%]
14:containerd.io-1.4.9-3.1.el7 ################################# [ 88%]
15:docker-ce-rootless-extras-0:20.10################################# [ 94%]
16:docker-ce-3:20.10.8-3.el7 ################################# [100%]
# 设置docker开机自启动
[root@docker-ce dockerce]# systemctl enable docker.service
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
# 启动docker服务
[root@docker-ce dockerce]# systemctl start docker.service
# 检查docker服务状态
[root@docker-ce dockerce]# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since 五 2021-08-06 09:07:16 CST; 4s ago
Docs: https://docs.docker.com
Main PID: 1457 (dockerd)
Tasks: 8
Memory: 32.4M
CGroup: /system.slice/docker.service
└─1457 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
8月 06 09:07:16 docker-ce dockerd[1457]: time="2021-08-06T09:07:16.330745638+08:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
8月 06 09:07:16 docker-ce dockerd[1457]: time="2021-08-06T09:07:16.330774600+08:00" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>}" module=grpc
8月 06 09:07:16 docker-ce dockerd[1457]: time="2021-08-06T09:07:16.330783365+08:00" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
8月 06 09:07:16 docker-ce dockerd[1457]: time="2021-08-06T09:07:16.351195085+08:00" level=info msg="Loading containers: start."
8月 06 09:07:16 docker-ce dockerd[1457]: time="2021-08-06T09:07:16.564336590+08:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
8月 06 09:07:16 docker-ce dockerd[1457]: time="2021-08-06T09:07:16.648617194+08:00" level=info msg="Loading containers: done."
8月 06 09:07:16 docker-ce dockerd[1457]: time="2021-08-06T09:07:16.691843360+08:00" level=info msg="Docker daemon" commit=75249d8 graphdriver(s)=overlay2 version=20.10.8
8月 06 09:07:16 docker-ce dockerd[1457]: time="2021-08-06T09:07:16.691979344+08:00" level=info msg="Daemon has completed initialization"
8月 06 09:07:16 docker-ce systemd[1]: Started Docker Application Container Engine.
8月 06 09:07:16 docker-ce dockerd[1457]: time="2021-08-06T09:07:16.718240088+08:00" level=info msg="API listen on /var/run/docker.sock"
# 打印docker版本详细信息
[root@docker-ce dockerce]# docker info
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc., v0.6.1-docker)
scan: Docker Scan (Docker Inc., v0.8.0)
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 20.10.8
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc io.containerd.runc.v2 io.containerd.runtime.v1.linux
Default Runtime: runc
Init Binary: docker-init
containerd version: e25210fe30a0a703442421b0f60afac609f950a3
runc version: v1.0.1-0-g4144b63
init version: de40ad0
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-1160.36.2.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.84GiB
Name: docker-ce
ID: BFJJ:PFZZ:L3J2:COC2:KHVT:NL6D:G45K:65IP:WJ4I:DHXJ:7XJM:N35A
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false