很意外啊!Docker社区版竟然直接从20.xx.xx版本,升级到23.xx.xx版本了。

官网地址(For RHEL/CentOS 7.9):

https://download.docker.com/linux/centos/7/x86_64/stable/Packages/

23.0.1版本官方安装包如下:

# ls -ltr
-rw-r--r--. 1 root root 34560264 2月  15 16:35 containerd.io-1.6.16-3.1.el7.x86_64.rpm
-rw-r--r--. 1 root root 12726684 2月  15 16:35 docker-buildx-plugin-0.10.2-1.el7.x86_64.rpm
-rw-r--r--. 1 root root 24548908 2月  15 16:35 docker-ce-23.0.1-1.el7.x86_64.rpm
-rw-r--r--. 1 root root 13913552 2月  15 16:35 docker-ce-cli-23.0.1-1.el7.x86_64.rpm
-rw-r--r--. 1 root root  9246560 2月  15 16:35 docker-ce-rootless-extras-23.0.1-1.el7.x86_64.rpm
-rw-r--r--. 1 root root 11441344 2月  15 16:36 docker-compose-plugin-2.16.0-1.el7.x86_64.rpm
-rw-r--r--. 1 root root  4079116 2月  15 16:37 docker-scan-plugin-0.23.0-1.el7.x86_64.rpm

下载完以上的官方包以后,将上面的包上传到一台可以连接外网CentOS7.9服务器上,然后使用下面的命令来下载依赖包。

# yum install -y *.rpm --downloadonly --downloaddir=./
已加载插件:fastestmirror, langpacks
正在检查 containerd.io-1.6.16-3.1.el7.x86_64.rpm: containerd.io-1.6.16-3.1.el7.x86_64
containerd.io-1.6.16-3.1.el7.x86_64.rpm 将被安装
正在检查 docker-buildx-plugin-0.10.2-1.el7.x86_64.rpm: docker-buildx-plugin-0.10.2-1.el7.x86_64
docker-buildx-plugin-0.10.2-1.el7.x86_64.rpm 将被安装
正在检查 docker-ce-23.0.1-1.el7.x86_64.rpm: 3:docker-ce-23.0.1-1.el7.x86_64
docker-ce-23.0.1-1.el7.x86_64.rpm 将被安装
正在检查 docker-ce-cli-23.0.1-1.el7.x86_64.rpm: 1:docker-ce-cli-23.0.1-1.el7.x86_64
docker-ce-cli-23.0.1-1.el7.x86_64.rpm 将被安装
正在检查 docker-ce-rootless-extras-23.0.1-1.el7.x86_64.rpm: docker-ce-rootless-extras-23.0.1-1.el7.x86_64
docker-ce-rootless-extras-23.0.1-1.el7.x86_64.rpm 将被安装
正在检查 docker-compose-plugin-2.16.0-1.el7.x86_64.rpm: docker-compose-plugin-2.16.0-1.el7.x86_64
docker-compose-plugin-2.16.0-1.el7.x86_64.rpm 将被安装
正在检查 docker-scan-plugin-0.23.0-1.el7.x86_64.rpm: docker-scan-plugin-0.23.0-1.el7.x86_64
docker-scan-plugin-0.23.0-1.el7.x86_64.rpm 将被安装
正在解决依赖关系
--> 正在检查事务
---> 软件包 containerd.io.x86_64.0.1.6.16-3.1.el7 将被 安装
--> 正在处理依赖关系 container-selinux >= 2:2.74,它被软件包 containerd.io-1.6.16-3.1.el7.x86_64 需要
Loading mirror speeds from cached hostfile
 * base: mirrors.ustc.edu.cn
 * extras: mirrors.huaweicloud.com
 * updates: mirrors.ustc.edu.cn
---> 软件包 docker-buildx-plugin.x86_64.0.0.10.2-1.el7 将被 安装
---> 软件包 docker-ce.x86_64.3.23.0.1-1.el7 将被 安装
--> 正在处理依赖关系 libcgroup,它被软件包 3:docker-ce-23.0.1-1.el7.x86_64 需要
---> 软件包 docker-ce-cli.x86_64.1.23.0.1-1.el7 将被 安装
---> 软件包 docker-ce-rootless-extras.x86_64.0.23.0.1-1.el7 将被 安装
--> 正在处理依赖关系 fuse-overlayfs >= 0.7,它被软件包 docker-ce-rootless-extras-23.0.1-1.el7.x86_64 需要
--> 正在处理依赖关系 slirp4netns >= 0.4,它被软件包 docker-ce-rootless-extras-23.0.1-1.el7.x86_64 需要
---> 软件包 docker-compose-plugin.x86_64.0.2.16.0-1.el7 将被 安装
---> 软件包 docker-scan-plugin.x86_64.0.0.23.0-1.el7 将被 安装
--> 正在检查事务
---> 软件包 container-selinux.noarch.2.2.119.2-1.911c772.el7_8 将被 安装
--> 正在处理依赖关系 policycoreutils-python,它被软件包 2:container-selinux-2.119.2-1.911c772.el7_8.noarch 需要
---> 软件包 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 将被 安装
---> 软件包 slirp4netns.x86_64.0.0.4.3-4.el7_8 将被 安装
--> 正在检查事务
---> 软件包 fuse3-libs.x86_64.0.3.6.1-4.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 需要
--> 正在检查事务
---> 软件包 audit-libs-python.x86_64.0.2.8.5-4.el7 将被 安装
---> 软件包 checkpolicy.x86_64.0.2.5-8.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                                           架构                           版本                                               源                                                                      大小
==================================================================================================================================================================================================================
正在安装:
 containerd.io                                     x86_64                         1.6.16-3.1.el7                                     /containerd.io-1.6.16-3.1.el7.x86_64                                   112 M
 docker-buildx-plugin                              x86_64                         0.10.2-1.el7                                       /docker-buildx-plugin-0.10.2-1.el7.x86_64                               53 M
 docker-ce                                         x86_64                         3:23.0.1-1.el7                                     /docker-ce-23.0.1-1.el7.x86_64                                          94 M
 docker-ce-cli                                     x86_64                         1:23.0.1-1.el7                                     /docker-ce-cli-23.0.1-1.el7.x86_64                                      34 M
 docker-ce-rootless-extras                         x86_64                         23.0.1-1.el7                                       /docker-ce-rootless-extras-23.0.1-1.el7.x86_64                          19 M
 docker-compose-plugin                             x86_64                         2.16.0-1.el7                                       /docker-compose-plugin-2.16.0-1.el7.x86_64                              45 M
 docker-scan-plugin                                x86_64                         0.23.0-1.el7                                       /docker-scan-plugin-0.23.0-1.el7.x86_64                                 12 M
为依赖而安装:
 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.119.2-1.911c772.el7_8                          extras                                                                  40 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

事务概要
==================================================================================================================================================================================================================
安装  7 软件包 (+11 依赖软件包)

总计:372 M
总下载量:1.9 M
安装大小:376 M
Background downloading packages, then exiting:
(1/11): audit-libs-python-2.8.5-4.el7.x86_64.rpm                                                                                                                                           |  76 kB  00:00:00     
(2/11): checkpolicy-2.5-8.el7.x86_64.rpm                                                                                                                                                   | 295 kB  00:00:00     
(3/11): libcgroup-0.41-21.el7.x86_64.rpm                                                                                                                                                   |  66 kB  00:00:00     
(4/11): container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm                                                                                                                               |  40 kB  00:00:00     
(5/11): libsemanage-python-2.5-14.el7.x86_64.rpm                                                                                                                                           | 113 kB  00:00:00     
(6/11): fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm                                                                                                                                            |  54 kB  00:00:00     
(7/11): python-IPy-0.75-6.el7.noarch.rpm                                                                                                                                                   |  32 kB  00:00:00     
(8/11): fuse3-libs-3.6.1-4.el7.x86_64.rpm                                                                                                                                                  |  82 kB  00:00:00     
(9/11): slirp4netns-0.4.3-4.el7_8.x86_64.rpm                                                                                                                                               |  81 kB  00:00:00     
(10/11): policycoreutils-python-2.5-34.el7.x86_64.rpm                                                                                                                                      | 457 kB  00:00:00     
(11/11): setools-libs-3.3.8-4.el7.x86_64.rpm                                                                                                                                               | 620 kB  00:00:00     
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
总计                                                                                                                                                                              4.2 MB/s | 1.9 MB  00:00:00     
exiting because "Download Only" specified
# ls -ltr
总用量 109884
-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 34560264 2月  15 16:35 containerd.io-1.6.16-3.1.el7.x86_64.rpm
-rw-r--r--. 1 root root 12726684 2月  15 16:35 docker-buildx-plugin-0.10.2-1.el7.x86_64.rpm
-rw-r--r--. 1 root root 24548908 2月  15 16:35 docker-ce-23.0.1-1.el7.x86_64.rpm
-rw-r--r--. 1 root root 13913552 2月  15 16:35 docker-ce-cli-23.0.1-1.el7.x86_64.rpm
-rw-r--r--. 1 root root  9246560 2月  15 16:35 docker-ce-rootless-extras-23.0.1-1.el7.x86_64.rpm
-rw-r--r--. 1 root root 11441344 2月  15 16:36 docker-compose-plugin-2.16.0-1.el7.x86_64.rpm
-rw-r--r--. 1 root root  4079116 2月  15 16:37 docker-scan-plugin-0.23.0-1.el7.x86_64.rpm

制作离线安装包

# tar -czf docker-ce-23.0.1-centos-rhel_7.9-offline-installer.tar.gz docker-ce
# ls -ltr
总用量 109588
drwxr-xr-x. 2 root root      4096 2月  15 16:41 docker-ce
-rw-r--r--. 1 root root 112213707 2月  15 16:55 docker-ce-23.0.1-centos-rhel_7.9-offline-installer.tar.gz

依赖包(12个)下载完成后,我们就可以将这个目录打包到任何CentOS或者Redaht 7.9版本的服务器上进行安装了。

# cd docker-ce
# yum install -y *.rpm
已加载插件:fastestmirror, langpacks
正在检查 audit-libs-python-2.8.5-4.el7.x86_64.rpm: audit-libs-python-2.8.5-4.el7.x86_64
audit-libs-python-2.8.5-4.el7.x86_64.rpm 将被安装
正在检查 checkpolicy-2.5-8.el7.x86_64.rpm: checkpolicy-2.5-8.el7.x86_64
checkpolicy-2.5-8.el7.x86_64.rpm 将被安装
正在检查 containerd.io-1.6.16-3.1.el7.x86_64.rpm: containerd.io-1.6.16-3.1.el7.x86_64
containerd.io-1.6.16-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-buildx-plugin-0.10.2-1.el7.x86_64.rpm: docker-buildx-plugin-0.10.2-1.el7.x86_64
docker-buildx-plugin-0.10.2-1.el7.x86_64.rpm 将被安装
正在检查 docker-ce-23.0.1-1.el7.x86_64.rpm: 3:docker-ce-23.0.1-1.el7.x86_64
docker-ce-23.0.1-1.el7.x86_64.rpm 将被安装
正在检查 docker-ce-cli-23.0.1-1.el7.x86_64.rpm: 1:docker-ce-cli-23.0.1-1.el7.x86_64
docker-ce-cli-23.0.1-1.el7.x86_64.rpm 将被安装
正在检查 docker-ce-rootless-extras-23.0.1-1.el7.x86_64.rpm: docker-ce-rootless-extras-23.0.1-1.el7.x86_64
docker-ce-rootless-extras-23.0.1-1.el7.x86_64.rpm 将被安装
正在检查 docker-compose-plugin-2.16.0-1.el7.x86_64.rpm: docker-compose-plugin-2.16.0-1.el7.x86_64
docker-compose-plugin-2.16.0-1.el7.x86_64.rpm 将被安装
正在检查 docker-scan-plugin-0.23.0-1.el7.x86_64.rpm: docker-scan-plugin-0.23.0-1.el7.x86_64
docker-scan-plugin-0.23.0-1.el7.x86_64.rpm 将被安装
正在检查 fuse3-libs-3.6.1-4.el7.x86_64.rpm: fuse3-libs-3.6.1-4.el7.x86_64
fuse3-libs-3.6.1-4.el7.x86_64.rpm 将被安装
正在检查 fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm: fuse-overlayfs-0.7.2-6.el7_8.x86_64
fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm 将被安装
正在检查 libcgroup-0.41-21.el7.x86_64.rpm: libcgroup-0.41-21.el7.x86_64
libcgroup-0.41-21.el7.x86_64.rpm 将被安装
正在检查 libsemanage-python-2.5-14.el7.x86_64.rpm: libsemanage-python-2.5-14.el7.x86_64
libsemanage-python-2.5-14.el7.x86_64.rpm 将被安装
正在检查 policycoreutils-python-2.5-34.el7.x86_64.rpm: policycoreutils-python-2.5-34.el7.x86_64
policycoreutils-python-2.5-34.el7.x86_64.rpm 将被安装
正在检查 python-IPy-0.75-6.el7.noarch.rpm: python-IPy-0.75-6.el7.noarch
python-IPy-0.75-6.el7.noarch.rpm 将被安装
正在检查 setools-libs-3.3.8-4.el7.x86_64.rpm: setools-libs-3.3.8-4.el7.x86_64
setools-libs-3.3.8-4.el7.x86_64.rpm 将被安装
正在检查 slirp4netns-0.4.3-4.el7_8.x86_64.rpm: slirp4netns-0.4.3-4.el7_8.x86_64
slirp4netns-0.4.3-4.el7_8.x86_64.rpm 将被安装
正在解决依赖关系
--> 正在检查事务
---> 软件包 audit-libs-python.x86_64.0.2.8.5-4.el7 将被 安装
---> 软件包 checkpolicy.x86_64.0.2.5-8.el7 将被 安装
---> 软件包 container-selinux.noarch.2.2.119.2-1.911c772.el7_8 将被 安装
---> 软件包 containerd.io.x86_64.0.1.6.16-3.1.el7 将被 安装
---> 软件包 docker-buildx-plugin.x86_64.0.0.10.2-1.el7 将被 安装
---> 软件包 docker-ce.x86_64.3.23.0.1-1.el7 将被 安装
---> 软件包 docker-ce-cli.x86_64.1.23.0.1-1.el7 将被 安装
---> 软件包 docker-ce-rootless-extras.x86_64.0.23.0.1-1.el7 将被 安装
---> 软件包 docker-compose-plugin.x86_64.0.2.16.0-1.el7 将被 安装
---> 软件包 docker-scan-plugin.x86_64.0.0.23.0-1.el7 将被 安装
---> 软件包 fuse-overlayfs.x86_64.0.0.7.2-6.el7_8 将被 安装
---> 软件包 fuse3-libs.x86_64.0.3.6.1-4.el7 将被 安装
---> 软件包 libcgroup.x86_64.0.0.41-21.el7 将被 安装
---> 软件包 libsemanage-python.x86_64.0.2.5-14.el7 将被 安装
---> 软件包 policycoreutils-python.x86_64.0.2.5-34.el7 将被 安装
---> 软件包 python-IPy.noarch.0.0.75-6.el7 将被 安装
---> 软件包 setools-libs.x86_64.0.3.3.8-4.el7 将被 安装
---> 软件包 slirp4netns.x86_64.0.0.4.3-4.el7_8 将被 安装
--> 解决依赖关系完成

依赖关系解决

==================================================================================================================================================================================================================
 Package                                          架构                          版本                                               源                                                                        大小
==================================================================================================================================================================================================================
正在安装:
 audit-libs-python                                x86_64                        2.8.5-4.el7                                        /audit-libs-python-2.8.5-4.el7.x86_64                                    316 k
 checkpolicy                                      x86_64                        2.5-8.el7                                          /checkpolicy-2.5-8.el7.x86_64                                            1.2 M
 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.6.16-3.1.el7                                     /containerd.io-1.6.16-3.1.el7.x86_64                                     112 M
 docker-buildx-plugin                             x86_64                        0.10.2-1.el7                                       /docker-buildx-plugin-0.10.2-1.el7.x86_64                                 53 M
 docker-ce                                        x86_64                        3:23.0.1-1.el7                                     /docker-ce-23.0.1-1.el7.x86_64                                            94 M
 docker-ce-cli                                    x86_64                        1:23.0.1-1.el7                                     /docker-ce-cli-23.0.1-1.el7.x86_64                                        34 M
 docker-ce-rootless-extras                        x86_64                        23.0.1-1.el7                                       /docker-ce-rootless-extras-23.0.1-1.el7.x86_64                            19 M
 docker-compose-plugin                            x86_64                        2.16.0-1.el7                                       /docker-compose-plugin-2.16.0-1.el7.x86_64                                45 M
 docker-scan-plugin                               x86_64                        0.23.0-1.el7                                       /docker-scan-plugin-0.23.0-1.el7.x86_64                                   12 M
 fuse-overlayfs                                   x86_64                        0.7.2-6.el7_8                                      /fuse-overlayfs-0.7.2-6.el7_8.x86_64                                     116 k
 fuse3-libs                                       x86_64                        3.6.1-4.el7                                        /fuse3-libs-3.6.1-4.el7.x86_64                                           270 k
 libcgroup                                        x86_64                        0.41-21.el7                                        /libcgroup-0.41-21.el7.x86_64                                            134 k
 libsemanage-python                               x86_64                        2.5-14.el7                                         /libsemanage-python-2.5-14.el7.x86_64                                    441 k
 policycoreutils-python                           x86_64                        2.5-34.el7                                         /policycoreutils-python-2.5-34.el7.x86_64                                1.2 M
 python-IPy                                       noarch                        0.75-6.el7                                         /python-IPy-0.75-6.el7.noarch                                            119 k
 setools-libs                                     x86_64                        3.3.8-4.el7                                        /setools-libs-3.3.8-4.el7.x86_64                                         1.8 M
 slirp4netns                                      x86_64                        0.4.3-4.el7_8                                      /slirp4netns-0.4.3-4.el7_8.x86_64                                        169 k

事务概要
==================================================================================================================================================================================================================
安装  18 软件包

总计:376 M
安装大小:376 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : libcgroup-0.41-21.el7.x86_64                                                                                                                                                                 1/18 
  正在安装    : docker-buildx-plugin-0.10.2-1.el7.x86_64                                                                                                                                                     2/18 
  正在安装    : audit-libs-python-2.8.5-4.el7.x86_64                                                                                                                                                         3/18 
  正在安装    : docker-scan-plugin-0.23.0-1.el7.x86_64                                                                                                                                                       4/18 
  正在安装    : slirp4netns-0.4.3-4.el7_8.x86_64                                                                                                                                                             5/18 
  正在安装    : setools-libs-3.3.8-4.el7.x86_64                                                                                                                                                              6/18 
  正在安装    : libsemanage-python-2.5-14.el7.x86_64                                                                                                                                                         7/18 
  正在安装    : python-IPy-0.75-6.el7.noarch                                                                                                                                                                 8/18 
  正在安装    : fuse3-libs-3.6.1-4.el7.x86_64                                                                                                                                                                9/18 
  正在安装    : fuse-overlayfs-0.7.2-6.el7_8.x86_64                                                                                                                                                         10/18 
  正在安装    : checkpolicy-2.5-8.el7.x86_64                                                                                                                                                                11/18 
  正在安装    : policycoreutils-python-2.5-34.el7.x86_64                                                                                                                                                    12/18 
  正在安装    : 2:container-selinux-2.119.2-1.911c772.el7_8.noarch                                                                                                                                          13/18 
  正在安装    : containerd.io-1.6.16-3.1.el7.x86_64                                                                                                                                                         14/18 
  正在安装    : docker-compose-plugin-2.16.0-1.el7.x86_64                                                                                                                                                   15/18 
  正在安装    : 1:docker-ce-cli-23.0.1-1.el7.x86_64                                                                                                                                                         16/18 
  正在安装    : docker-ce-rootless-extras-23.0.1-1.el7.x86_64                                                                                                                                               17/18 
  正在安装    : 3:docker-ce-23.0.1-1.el7.x86_64                                                                                                                                                             18/18 
  验证中      : docker-compose-plugin-2.16.0-1.el7.x86_64                                                                                                                                                    1/18 
  验证中      : checkpolicy-2.5-8.el7.x86_64                                                                                                                                                                 2/18 
  验证中      : fuse3-libs-3.6.1-4.el7.x86_64                                                                                                                                                                3/18 
  验证中      : python-IPy-0.75-6.el7.noarch                                                                                                                                                                 4/18 
  验证中      : fuse-overlayfs-0.7.2-6.el7_8.x86_64                                                                                                                                                          5/18 
  验证中      : libsemanage-python-2.5-14.el7.x86_64                                                                                                                                                         6/18 
  验证中      : setools-libs-3.3.8-4.el7.x86_64                                                                                                                                                              7/18 
  验证中      : slirp4netns-0.4.3-4.el7_8.x86_64                                                                                                                                                             8/18 
  验证中      : 2:container-selinux-2.119.2-1.911c772.el7_8.noarch                                                                                                                                           9/18 
  验证中      : docker-ce-rootless-extras-23.0.1-1.el7.x86_64                                                                                                                                               10/18 
  验证中      : 3:docker-ce-23.0.1-1.el7.x86_64                                                                                                                                                             11/18 
  验证中      : docker-scan-plugin-0.23.0-1.el7.x86_64                                                                                                                                                      12/18 
  验证中      : policycoreutils-python-2.5-34.el7.x86_64                                                                                                                                                    13/18 
  验证中      : audit-libs-python-2.8.5-4.el7.x86_64                                                                                                                                                        14/18 
  验证中      : libcgroup-0.41-21.el7.x86_64                                                                                                                                                                15/18 
  验证中      : docker-buildx-plugin-0.10.2-1.el7.x86_64                                                                                                                                                    16/18 
  验证中      : containerd.io-1.6.16-3.1.el7.x86_64                                                                                                                                                         17/18 
  验证中      : 1:docker-ce-cli-23.0.1-1.el7.x86_64                                                                                                                                                         18/18 

已安装:
  audit-libs-python.x86_64 0:2.8.5-4.el7            checkpolicy.x86_64 0:2.5-8.el7                 container-selinux.noarch 2:2.119.2-1.911c772.el7_8       containerd.io.x86_64 0:1.6.16-3.1.el7                
  docker-buildx-plugin.x86_64 0:0.10.2-1.el7        docker-ce.x86_64 3:23.0.1-1.el7                docker-ce-cli.x86_64 1:23.0.1-1.el7                      docker-ce-rootless-extras.x86_64 0:23.0.1-1.el7      
  docker-compose-plugin.x86_64 0:2.16.0-1.el7       docker-scan-plugin.x86_64 0:0.23.0-1.el7       fuse-overlayfs.x86_64 0:0.7.2-6.el7_8                    fuse3-libs.x86_64 0:3.6.1-4.el7                      
  libcgroup.x86_64 0:0.41-21.el7                    libsemanage-python.x86_64 0:2.5-14.el7         policycoreutils-python.x86_64 0:2.5-34.el7               python-IPy.noarch 0:0.75-6.el7                       
  setools-libs.x86_64 0:3.3.8-4.el7                 slirp4netns.x86_64 0:0.4.3-4.el7_8            

完毕!

启动和运行Docker服务:

# systemctl start docker.service docker.socket containerd.service 
# systemctl enable docker.service docker.socket containerd.service 
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
Created symlink from /etc/systemd/system/sockets.target.wants/docker.socket to /usr/lib/systemd/system/docker.socket.
Created symlink from /etc/systemd/system/multi-user.target.wants/containerd.service to /usr/lib/systemd/system/containerd.service.
# systemctl status docker.service docker.socket containerd.service 
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: active (running) since 三 2023-02-15 16:58:11 CST; 27s ago
     Docs: https://docs.docker.com
 Main PID: 2011 (dockerd)
   CGroup: /system.slice/docker.service
           └─2011 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

2月 15 16:58:11 ansible-awx dockerd[2011]: time="2023-02-15T16:58:11.482644777+08:00" level=info msg="[core] [Channel #4 SubChannel #5] Subchannel Connectivity change to READY" module=grpc
2月 15 16:58:11 ansible-awx dockerd[2011]: time="2023-02-15T16:58:11.482668235+08:00" level=info msg="[core] [Channel #4] Channel Connectivity change to READY" module=grpc
2月 15 16:58:11 ansible-awx dockerd[2011]: time="2023-02-15T16:58:11.570631773+08:00" level=info msg="Loading containers: start."
2月 15 16:58:11 ansible-awx dockerd[2011]: time="2023-02-15T16:58:11.791043566+08:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip...ed IP address"
2月 15 16:58:11 ansible-awx dockerd[2011]: time="2023-02-15T16:58:11.916708617+08:00" level=info msg="Loading containers: done."
2月 15 16:58:11 ansible-awx dockerd[2011]: time="2023-02-15T16:58:11.935689895+08:00" level=info msg="Docker daemon" commit=bc3805a graphdriver=overlay2 version=23.0.1
2月 15 16:58:11 ansible-awx dockerd[2011]: time="2023-02-15T16:58:11.935822467+08:00" level=info msg="Daemon has completed initialization"
2月 15 16:58:11 ansible-awx dockerd[2011]: time="2023-02-15T16:58:11.954628261+08:00" level=info msg="[core] [Server #7] Server created" module=grpc
2月 15 16:58:11 ansible-awx systemd[1]: Started Docker Application Container Engine.
2月 15 16:58:11 ansible-awx dockerd[2011]: time="2023-02-15T16:58:11.958876584+08:00" level=info msg="API listen on /run/docker.sock"

● docker.socket - Docker Socket for the API
   Loaded: loaded (/usr/lib/systemd/system/docker.socket; enabled; vendor preset: disabled)
   Active: active (running) since 三 2023-02-15 16:58:11 CST; 28s ago
   Listen: /run/docker.sock (Stream)

2月 15 16:58:10 ansible-awx systemd[1]: Starting Docker Socket for the API.
2月 15 16:58:11 ansible-awx systemd[1]: Listening on Docker Socket for the API.

● containerd.service - containerd container runtime
   Loaded: loaded (/usr/lib/systemd/system/containerd.service; enabled; vendor preset: disabled)
   Active: active (running) since 三 2023-02-15 16:58:11 CST; 27s ago
     Docs: https://containerd.io
 Main PID: 1999 (containerd)
   CGroup: /system.slice/containerd.service
           └─1999 /usr/bin/containerd

2月 15 16:58:11 ansible-awx containerd[1999]: time="2023-02-15T16:58:11.329672374+08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.tasks\"..." type=io.containerd.grpc.v1
2月 15 16:58:11 ansible-awx containerd[1999]: time="2023-02-15T16:58:11.329682304+08:00" level=info msg="loading plugin \"io.containerd.grpc.v1.version\"..." type=io.containerd.grpc.v1
2月 15 16:58:11 ansible-awx containerd[1999]: time="2023-02-15T16:58:11.329690690+08:00" level=info msg="loading plugin \"io.containerd.tracing.processor.v1.otlp\"..." type=io.containerd.tracing.processor.v1
2月 15 16:58:11 ansible-awx containerd[1999]: time="2023-02-15T16:58:11.329702258+08:00" level=info msg="skip loading plugin \"io.containerd.tracing.processor.v1.otlp\"..." error="no OpenTelem...g.processor.v1
2月 15 16:58:11 ansible-awx containerd[1999]: time="2023-02-15T16:58:11.329720103+08:00" level=info msg="loading plugin \"io.containerd.internal.v1.tracing\"..." type=io.containerd.internal.v1
2月 15 16:58:11 ansible-awx containerd[1999]: time="2023-02-15T16:58:11.329746901+08:00" level=error msg="failed to initialize a tracing processor \"otlp\"" error="no OpenTelemetry endpoint: skip plugin"
2月 15 16:58:11 ansible-awx containerd[1999]: time="2023-02-15T16:58:11.330739315+08:00" level=info msg=serving... address=/run/containerd/containerd.sock.ttrpc
2月 15 16:58:11 ansible-awx containerd[1999]: time="2023-02-15T16:58:11.330794593+08:00" level=info msg=serving... address=/run/containerd/containerd.sock
2月 15 16:58:11 ansible-awx containerd[1999]: time="2023-02-15T16:58:11.331301549+08:00" level=info msg="containerd successfully booted in 0.063956s"
2月 15 16:58:11 ansible-awx systemd[1]: Started containerd container runtime.
Hint: Some lines were ellipsized, use -l to show in full.

检查Docker版本信息

# docker version
Client: Docker Engine - Community
 Version:           23.0.1
 API version:       1.42
 Go version:        go1.19.5
 Git commit:        a5ee5b1
 Built:             Thu Feb  9 19:51:00 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          23.0.1
  API version:      1.42 (minimum version 1.12)
  Go version:       go1.19.5
  Git commit:       bc3805a
  Built:            Thu Feb  9 19:48:42 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.16
  GitCommit:        31aa4358a36870b21a992d3ad2bef29e1d693bec
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
# docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.10.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.16.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose
  scan: Docker Scan (Docker Inc.)
    Version:  v0.23.0
    Path:     /usr/libexec/docker/cli-plugins/docker-scan

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 23.0.1
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Using metacopy: false
  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: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 31aa4358a36870b21a992d3ad2bef29e1d693bec
 runc version: v1.1.4-0-g5fd4c4d
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
 Kernel Version: 3.10.0-1160.el7.x86_64
 Operating System: CentOS Linux 7 (Core)
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.777GiB
 Name: ansible-awx
 ID: 8ddcc835-4bb3-4498-95db-39398af4836a
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Docker-ce 23.0.1 vs Docker-ce 20.10.23

从组件版本信息对比来看,让我很意外的是,20.10.23版本竟然被打上了“Experimental”的实验标识,之前并没有注意到这一点。但是,23版本中,这个标识已经被去除了。

其他的改变,主要还是组件版本的升级,包括Docker引擎、Go、docker-buildx、docker-compose版本的升级。

其他的安全修复、新增的功能,感兴趣的可以自行网上搜索。




dockerhub直接下载到本地 docker ce下载_docker-ce-23