Docker社区版删除及离线安装

简介: 使用rpm包离线安装Docker社区版比较繁琐的是依赖包的下载,使用yum工具下载离线安装包可以简化这一操作

1 下载离线安装包

      离线方式安装Dockers社区版可以使用二进制包或者rpm包,使用二进制包安装很简单,安装之后的配置稍微复杂点。使用rpm包安装比较繁琐、容易出错的是依赖包的下载和安装,只要安装包及其依赖包下载完整了,安装和配置都很简单。手动下载依赖包容易出错,这里使用yumdownloader一条命令下载安装包及其依赖包,操作简单,也不会出错。

     使用yumdownloader的前提是yum-utils已经安装,使用下面命令查看这个工具是否安装。

[root@ docker_package]# yum list installed |grep yumyum.noarch                            4.7.0-4.el8                             @System
yum-utils.noarch                      4.0.21-3.el8                            @base

    使用yumdownloader下载Docker-ce安装包及其依赖包,--resolve选项会解决依赖问题,下载需要安装的依赖包。

[root@ ~]# yumdownloader --resolve --destdir=/root/docker_package/ docker-ce    Last metadata expiration check: 0:03:06 ago on Thu 20 Oct 202209:32:14 AM CST.
    docker-ce-20.10.18-3.el8.x86_64.rpm                                                     134 kB/s |  21 MB     02:40

    这台机器上已经安装了Docker-ce,yumdownloader只下载了安装包,没有下载它的依赖包,要想下载全部的依赖包,看一下yumdownloader的帮助,是否有选项可以全部依赖包。

[root@ ~]# yumdownloader --help      usage: dnf download [-c [config file]] [-q] [-v] [--version]
                          [--installroot [path]] [--nodocs] [--noplugins]
                          [--enableplugin [plugin]] [--disableplugin [plugin]]
                          [--releasever RELEASEVER] [--setopt SETOPTS]
                          [--skip-broken] [-h] [--allowerasing] [-b | --nobest] [-C]
                          [-R [minutes]] [-d [debug level]] [--debugsolver]
                          [--showduplicates] [-e ERRORLEVEL] [--obsoletes]
                          [--rpmverbosity [debug level name]] [-y] [--assumeno]
                          [--enablerepo [repo]] [--disablerepo [repo] | --repo                          [repo]] [--enable | --disable] [-x [package]]
                          [--disableexcludes [repo]] [--repofrompath [repo,path]]
                          [--noautoremove] [--nogpgcheck] [--color COLOR]
                          [--refresh] [-4] [-6] [--destdir DESTDIR] [--downloadonly]
                          [--comment COMMENT] [--bugfix] [--enhancement]
                          [--newpackage] [--security] [--advisory ADVISORY]
                          [--bz BUGZILLA] [--cve CVES]
                          [--sec-severity {Critical,Important,Moderate,Low}]
                          [--forcearch ARCH] [--source] [--debuginfo]
                          [--debugsource] [--arch [arch]] [--resolve] [--alldeps]
                          [--url] [--urlprotocols {http,https,rsync,ftp}]
                          packages [packages ...]
      Download package to current directory
      General DNF options:
-c [config file], --config [config file]
                              config file location
-q, --quiet           quiet operation
-v, --verbose         verbose operation
--version             show DNF version and exit--installroot [path]  set install root
--nodocsdo not install documentations
--noplugins           disable all plugins
--enableplugin [plugin]
                              enable plugins by name
--disableplugin [plugin]
                              disable plugins by name
--releasever RELEASEVER
                              override the value of $releaseverin config and repo
                              files
--setopt SETOPTS      set arbitrary config and repo options
--skip-broken         resolve depsolve problems by skipping packages
-h, --help, --help-cmd                              show command help
--allowerasing        allow erasing of installed packages to resolve
                              dependencies
-b, --best            try the best available package versions in                              transactions.
--nobestdo not limit the transaction to the best candidate
-C, --cacheonly       run entirely from system cache, don't update cache        -R [minutes], --randomwait [minutes]                              maximum command wait time        -d [debug level], --debuglevel [debug level]                              debugging output level        --debugsolver         dumps detailed solving results into files        --showduplicates      show duplicates, in repos, in list/search commands        -e ERRORLEVEL, --errorlevel ERRORLEVEL                              error output level        --obsoletes           enables dnf's obsoletes processing logic for upgrade
                              or display capabilities that the package obsoletes for                              info, list and repoquery
--rpmverbosity [debug level name]
                              debugging output level for rpm
-y, --assumeyes       automatically answer yesfor all questions
--assumeno            automatically answer no for all questions
--enablerepo [repo]   Enable additional repositories. List option. Supports
                              globs, can be specified multiple times.
--disablerepo [repo]  Disable repositories. List option. Supports globs, can
                              be specified multiple times.
--repo [repo], --repoid [repo]
                              enable just specific repositories by an id or a glob,
                              can be specified multiple times
--enable              enable repos with config-manager command
                              (automatically saves)
--disable             disable repos with config-manager command
                              (automatically saves)
-x [package], --exclude [package], --excludepkgs [package]
                              exclude packages by name or glob
--disableexcludes [repo], --disableexcludepkgs [repo]
                              disable excludepkgs
--repofrompath [repo,path]
                              label and path to an additional repository to use
                              (same path as in a baseurl), can be specified multiple
                              times.
--noautoremove        disable removal of dependencies that are no longer
                              used
--nogpgcheck          disable gpg signature checking (if RPM policy allows)
--color COLOR         control whether color is used
--refreshset metadata as expired before running the command
-4                    resolve to IPv4 addresses only
-6                    resolve to IPv6 addresses only
--destdir DESTDIR, --downloaddir DESTDIR
set directory to copy packages to
--downloadonly        only download packages
--comment COMMENT     add a comment to transaction
--bugfix              Include bugfix relevant packages, in updates
--enhancement         Include enhancement relevant packages, in updates
--newpackage          Include newpackage relevant packages, in updates
--security            Include security relevant packages, in updates
--advisory ADVISORY, --advisories ADVISORY
                              Include packages needed to fix the given advisory, in                              updates
--bz BUGZILLA, --bzs BUGZILLA
                              Include packages needed to fix the given BZ, in                              updates
--cve CVES, --cves CVES
                              Include packages needed to fix the given CVE, in                              updates
--sec-severity {Critical,Important,Moderate,Low}, --secseverity {Critical,Important,Moderate,Low}
                              Include security relevant packages matching the
                              severity, in updates
--forcearch ARCH      Force the use of an architecture
      Download command-specific options:
--source              download the src.rpm instead
--debuginfo           download the -debuginfo package instead
--debugsource         download the -debugsource package instead
--arch [arch], --archlist [arch]
                              limit the query to packages of given architectures.
--resolve             resolve and download needed dependencies
--alldeps             when running with --resolve, download all dependencies
                              (do not exclude already installed ones)
--url, --urls         print list of urls where the rpms can be downloaded
                              instead of downloading
--urlprotocols {http,https,rsync,ftp}
                              when running with --url, limit to specific protocols
        packages              packages to download

可以看到有个alldeps选项,这个选项的说明如下:

--alldeps             when running with --resolve, download all dependencies

                             (do not exclude already installed ones)

这个选项同--resolve选项一起使用,下载所有依赖,不排除已经安装的依赖包。    

运行下面命令下载安装包及其所有依赖包

[root@ ~]# yumdownloader --resolve --alldeps  --destdir=/root/docker_package/ docker-ce    Last metadata expiration check: 0:08:01 ago on Thu 20 Oct 202209:32:14 AM CST.
    [SKIPPED] docker-ce-20.10.18-3.el8.x86_64.rpm: Already downloaded
    (2/199): libsemanage-2.9-6.el8.x86_64.rpm                                               1.4 MB/s | 165 kB     00:00
    (3/199): libselinux-2.9-5.el8.x86_64.rpm                                                1.2 MB/s | 165 kB     00:00
    (4/199): libselinux-utils-2.9-5.el8.x86_64.rpm                                          1.6 MB/s | 243 kB     00:00
    (5/199): python3-pip-wheel-9.0.3-20.el8.noarch.rpm                                       10 MB/s | 1.0 MB     00:00
    (6/199): libsepol-2.9-3.el8.x86_64.rpm                                                  3.7 MB/s | 340 kB     00:00
    (7/199): python3-policycoreutils-2.9-16.el8.noarch.rpm                                   18 MB/s | 2.2 MB     00:00
    (8/199): libsigsegv-2.11-5.el8.x86_64.rpm                                               293 kB/s |  30 kB     00:00
    (9/199): libsmartcols-2.32.1-28.el8.x86_64.rpm                                          1.4 MB/s | 177 kB     00:00
    (10/199): slirp4netns-1.1.8-1.module_el8.5.0+890+6b136101.x86_64.rpm                    503 kB/s |  51 kB     00:00
    (11/199): python3-setools-4.3.0-2.el8.x86_64.rpm                                        8.7 MB/s | 626 kB     00:00
    (12/199): acl-2.2.53-1.el8.x86_64.rpm                                                   1.1 MB/s |  81 kB     00:00
    (13/199): libssh-0.9.4-3.el8.x86_64.rpm                                                 3.2 MB/s | 215 kB     00:00
    (14/199): gmp-6.1.2-10.el8.x86_64.rpm                                                   3.5 MB/s | 322 kB     00:00
    (15/199): python3-setuptools-wheel-39.2.0-6.el8.noarch.rpm                              5.5 MB/s | 289 kB     00:00
    (16/199): libssh-config-0.9.4-3.el8.noarch.rpm                                          201 kB/s |  19 kB     00:00
    (17/199): gnutls-3.6.16-4.el8.x86_64.rpm                                                 14 MB/s | 1.0 MB     00:00
    (18/199): grep-3.1-6.el8.x86_64.rpm                                                     2.7 MB/s | 274 kB     00:00
    (19/199): audit-libs-3.0-0.17.20191104git1c2f876.el8.x86_64.rpm                         1.3 MB/s | 116 kB     00:00
    (20/199): grub2-common-2.02-106.el8.noarch.rpm                                          7.1 MB/s | 891 kB     00:00
    (21/199): grub2-tools-2.02-106.el8.x86_64.rpm                                            22 MB/s | 2.0 MB     00:00
    (22/199): grub2-tools-minimal-2.02-106.el8.x86_64.rpm                                   2.5 MB/s | 210 kB     00:00
    (23/199): grubby-8.40-42.el8.x86_64.rpm                                                 611 kB/s |  49 kB     00:00
    (24/199): rdma-core-35.0-1.el8.x86_64.rpm                                               1.0 MB/s |  59 kB     00:00
    (25/199): libstdc++-8.5.0-4.el8_5.x86_64.rpm                                            6.3 MB/s | 453 kB     00:00
    (26/199): gzip-1.9-12.el8.x86_64.rpm                                                    2.3 MB/s | 167 kB     00:00
    (27/199): basesystem-11-5.el8.noarch.rpm                                                126 kB/s |  10 kB     00:00
    (28/199): bash-4.4.20-2.el8.x86_64.rpm                                                   11 MB/s | 1.5 MB     00:00
    (29/199): hwdata-0.314-8.10.el8.noarch.rpm                                               16 MB/s | 1.7 MB     00:00
    (30/199): hardlink-1.3-6.el8.x86_64.rpm                                                 138 kB/s |  29 kB     00:00
    (31/199): readline-7.0-10.el8.x86_64.rpm                                                2.1 MB/s | 199 kB     00:00
    (32/199): rpm-4.14.3-19.el8.x86_64.rpm                                                  7.7 MB/s | 543 kB     00:00
    (33/199): libxkbcommon-0.9.1-1.el8.x86_64.rpm                                           1.5 MB/s | 116 kB     00:00
    (34/199): info-6.5-6.el8.x86_64.rpm                                                     2.7 MB/s | 198 kB     00:00
    (35/199): rpm-libs-4.14.3-19.el8.x86_64.rpm                                             4.5 MB/s | 344 kB     00:00
    (36/199): libtasn1-4.13-3.el8.x86_64.rpm                                                589 kB/s |  76 kB     00:00
    (37/199): brotli-1.0.6-3.el8.x86_64.rpm                                                 5.5 MB/s | 323 kB     00:00
    (38/199): libtirpc-1.1.4-5.el8.x86_64.rpm                                               1.6 MB/s | 112 kB     00:00
    (39/199): iptables-1.8.4-20.el8.x86_64.rpm                                              6.6 MB/s | 585 kB     00:00
    (40/199): bzip2-libs-1.0.6-26.el8.x86_64.rpm                                            585 kB/s |  48 kB     00:00
    (41/199): iptables-libs-1.8.4-20.el8.x86_64.rpm                                         1.7 MB/s | 107 kB     00:00
    (42/199): rpm-plugin-selinux-4.14.3-19.el8.x86_64.rpm                                   311 kB/s |  77 kB     00:00
    (43/199): ca-certificates-2021.2.50-80.0.el8_4.noarch.rpm                               7.1 MB/s | 390 kB     00:00
    (44/199): centos-gpg-keys-8-3.el8.noarch.rpm                                            195 kB/s |  12 kB     00:00
    (45/199): centos-linux-release-8.5-1.2111.el8.noarch.rpm                                383 kB/s |  22 kB     00:00
    (46/199): libunistring-0.9.9-3.el8.x86_64.rpm                                           3.6 MB/s | 422 kB     00:00
    (47/199): centos-linux-repos-8-3.el8.noarch.rpm                                         264 kB/s |  20 kB     00:00
    (48/199): checkpolicy-2.9-1.el8.x86_64.rpm                                              2.9 MB/s | 348 kB     00:00
    (49/199): chkconfig-1.19.1-1.el8.x86_64.rpm                                             1.9 MB/s | 198 kB     00:00
    (50/199): libutempter-1.1.6-14.el8.x86_64.rpm                                           235 kB/s |  32 kB     00:00
    (51/199): libuuid-2.32.1-28.el8.x86_64.rpm                                              1.3 MB/s |  96 kB     00:00
    (52/199): coreutils-common-8.30-12.el8.x86_64.rpm                                        20 MB/s | 2.0 MB     00:00
    (53/199): libverto-0.3.0-5.el8.x86_64.rpm                                               305 kB/s |  24 kB     00:00
    (54/199): coreutils-8.30-12.el8.x86_64.rpm                                              7.1 MB/s | 1.2 MB     00:00
    (55/199): cpio-2.12-10.el8.x86_64.rpm                                                   3.8 MB/s | 265 kB     00:00
    (56/199): cracklib-2.9.6-15.el8.x86_64.rpm                                              1.0 MB/s |  93 kB     00:00
    (57/199): sed-4.5-2.el8.x86_64.rpm                                                      5.2 MB/s | 298 kB     00:00
    (58/199): selinux-policy-3.14.3-80.el8_5.2.noarch.rpm                                   8.2 MB/s | 636 kB     00:00
    (59/199): cracklib-dicts-2.9.6-15.el8.x86_64.rpm                                         21 MB/s | 4.0 MB     00:00
    (60/199): libxcrypt-4.1.1-6.el8.x86_64.rpm                                              740 kB/s |  73 kB     00:00
    (61/199): crypto-policies-scripts-20210617-1.gitc776d3e.el8.noarch.rpm                  1.6 MB/s |  83 kB     00:00
    (62/199): crypto-policies-20210617-1.gitc776d3e.el8.noarch.rpm                          630 kB/s |  63 kB     00:00
    (63/199): libxml2-2.9.7-9.el8_4.2.x86_64.rpm                                             10 MB/s | 696 kB     00:00
    (64/199): json-c-0.13.1-2.el8.x86_64.rpm                                                673 kB/s |  40 kB     00:00
    (65/199): cryptsetup-libs-2.3.3-4.el8.x86_64.rpm                                        6.7 MB/s | 470 kB     00:00
    (66/199): kbd-2.0.4-10.el8.x86_64.rpm                                                   5.3 MB/s | 390 kB     00:00
    (67/199): kbd-legacy-2.0.4-10.el8.noarch.rpm                                            6.8 MB/s | 481 kB     00:00
    (68/199): kbd-misc-2.0.4-10.el8.noarch.rpm                                               17 MB/s | 1.5 MB     00:00
    (69/199): curl-7.61.1-22.el8.x86_64.rpm                                                 4.6 MB/s | 351 kB     00:00
    (70/199): libzstd-1.4.4-1.el8.x86_64.rpm                                                3.3 MB/s | 266 kB     00:00
    (71/199): setup-2.12.2-6.el8.noarch.rpm                                                 2.4 MB/s | 181 kB     00:00
    (72/199): shadow-utils-4.6-14.el8.x86_64.rpm                                            8.1 MB/s | 1.2 MB     00:00
    (73/199): shared-mime-info-1.9-3.el8.x86_64.rpm                                         2.5 MB/s | 329 kB     00:00
    (74/199): selinux-policy-targeted-3.14.3-80.el8_5.2.noarch.rpm                           36 MB/s |  15 MB     00:00
    (75/199): dbus-1.12.8-14.el8.x86_64.rpm                                                 196 kB/s |  41 kB     00:00
    (76/199): cyrus-sasl-lib-2.1.27-5.el8.x86_64.rpm                                        552 kB/s | 123 kB     00:00
    (77/199): dbus-daemon-1.12.8-14.el8.x86_64.rpm                                          2.6 MB/s | 240 kB     00:00
    (78/199): dbus-common-1.12.8-14.el8.noarch.rpm                                          468 kB/s |  46 kB     00:00
    (79/199): lua-libs-5.3.4-12.el8.x86_64.rpm                                              1.3 MB/s | 118 kB     00:00
    (80/199): dbus-libs-1.12.8-14.el8.x86_64.rpm                                            2.6 MB/s | 184 kB     00:00
    (81/199): dbus-tools-1.12.8-14.el8.x86_64.rpm                                           1.2 MB/s |  85 kB     00:00
    (82/199): sqlite-libs-3.26.0-15.el8.x86_64.rpm                                          5.9 MB/s | 581 kB     00:00
    (83/199): device-mapper-1.02.177-10.el8.x86_64.rpm                                      6.3 MB/s | 377 kB     00:00
    (84/199): lz4-libs-1.8.3-3.el8_4.x86_64.rpm                                             1.0 MB/s |  66 kB     00:00
    (85/199): xkeyboard-config-2.28-1.el8.noarch.rpm                                        8.3 MB/s | 782 kB     00:00
    (86/199): device-mapper-libs-1.02.177-10.el8.x86_64.rpm                                 5.9 MB/s | 409 kB     00:00
    (87/199): kmod-25-18.el8.x86_64.rpm                                                     2.1 MB/s | 126 kB     00:00
    (88/199): keyutils-libs-1.5.10-9.el8.x86_64.rpm                                         180 kB/s |  34 kB     00:00
    (89/199): memstrack-0.1.11-1.el8.x86_64.rpm                                             648 kB/s |  48 kB     00:00
    (90/199): diffutils-3.6-6.el8.x86_64.rpm                                                2.3 MB/s | 358 kB     00:00
    (91/199): kmod-libs-25-18.el8.x86_64.rpm                                                825 kB/s |  68 kB     00:00
    (92/199): kpartx-0.8.4-17.el8.x86_64.rpm                                                1.3 MB/s | 113 kB     00:00
    (93/199): dracut-049-191.git20210920.el8.x86_64.rpm                                     4.6 MB/s | 374 kB     00:00
    (94/199): mpfr-3.1.6-1.el8.x86_64.rpm                                                   1.9 MB/s | 221 kB     00:00
    (95/199): ncurses-6.1-9.20180224.el8.x86_64.rpm                                         3.0 MB/s | 387 kB     00:00
    (96/199): krb5-libs-1.18.2-14.el8.x86_64.rpm                                            5.4 MB/s | 840 kB     00:00
    (97/199): ncurses-base-6.1-9.20180224.el8.noarch.rpm                                    1.3 MB/s |  81 kB     00:00
    (98/199): libacl-2.2.53-1.el8.x86_64.rpm                                                546 kB/s |  35 kB     00:00
    (99/199): ncurses-libs-6.1-9.20180224.el8.x86_64.rpm                                    5.7 MB/s | 334 kB     00:00
    (100/199): elfutils-debuginfod-client-0.185-1.el8.x86_64.rpm                            906 kB/s |  66 kB     00:00
    (101/199): libarchive-3.3.3-1.el8.x86_64.rpm                                            6.3 MB/s | 359 kB     00:00
    (102/199): elfutils-default-yama-scope-0.185-1.el8.noarch.rpm                           937 kB/s |  49 kB     00:00
    (103/199): elfutils-libelf-0.185-1.el8.x86_64.rpm                                       3.3 MB/s | 221 kB     00:00
    (104/199): nettle-3.4.1-7.el8.x86_64.rpm                                                4.5 MB/s | 301 kB     00:00
    (105/199): elfutils-libs-0.185-1.el8.x86_64.rpm                                         2.9 MB/s | 292 kB     00:00
    (106/199): expat-2.2.5-4.el8.x86_64.rpm                                                 1.1 MB/s | 111 kB     00:00
    (107/199): libattr-2.4.48-3.el8.x86_64.rpm                                              376 kB/s |  27 kB     00:00
    (108/199): systemd-239-51.el8_5.2.x86_64.rpm                                             21 MB/s | 3.6 MB     00:00
    (109/199): file-5.33-20.el8.x86_64.rpm                                                  1.1 MB/s |  77 kB     00:00
    (110/199): file-libs-5.33-20.el8.x86_64.rpm                                             5.4 MB/s | 543 kB     00:00
    (111/199): filesystem-3.8-6.el8.x86_64.rpm                                               11 MB/s | 1.1 MB     00:00
    (112/199): libblkid-2.32.1-28.el8.x86_64.rpm                                            2.9 MB/s | 217 kB     00:00
    (113/199): findutils-4.6.0-20.el8.x86_64.rpm                                            4.2 MB/s | 528 kB     00:00
    (114/199): systemd-pam-239-51.el8_5.2.x86_64.rpm                                        6.9 MB/s | 477 kB     00:00
    (115/199): libcap-2.26-5.el8.x86_64.rpm                                                 981 kB/s |  60 kB     00:00
    (116/199): systemd-libs-239-51.el8_5.2.x86_64.rpm                                        11 MB/s | 1.1 MB     00:00
    (117/199): libcap-ng-0.7.11-1.el8.x86_64.rpm                                            550 kB/s |  33 kB     00:00
    (118/199): tar-1.30-5.el8.x86_64.rpm                                                    9.3 MB/s | 838 kB     00:00
    (119/199): fuse-common-3.2.1-12.el8.x86_64.rpm                                          1.3 MB/s |  21 kB     00:00
    (120/199): systemd-udev-239-51.el8_5.2.x86_64.rpm                                        12 MB/s | 1.6 MB     00:00
    (121/199): libcgroup-0.41-19.el8.x86_64.rpm                                             986 kB/s |  70 kB     00:00
    (122/199): libcom_err-1.45.6-2.el8.x86_64.rpm                                           822 kB/s |  49 kB     00:00
    (123/199): fuse3-3.2.1-12.el8.x86_64.rpm                                                676 kB/s |  50 kB     00:00
    (124/199): fuse3-libs-3.2.1-12.el8.x86_64.rpm                                           1.5 MB/s |  94 kB     00:00
    (125/199): libcroco-0.6.12-4.el8_2.1.x86_64.rpm                                         1.5 MB/s | 113 kB     00:00
    (126/199): libcurl-7.61.1-22.el8.x86_64.rpm                                             4.7 MB/s | 301 kB     00:00
    (127/199): openldap-2.4.46-18.el8.x86_64.rpm                                            3.8 MB/s | 352 kB     00:00
    (128/199): trousers-0.3.15-1.el8.x86_64.rpm                                             2.2 MB/s | 152 kB     00:00
    (129/199): gawk-4.2.1-2.el8.x86_64.rpm                                                  9.3 MB/s | 1.1 MB     00:00
    (130/199): libdb-5.3.28-42.el8_4.x86_64.rpm                                             7.2 MB/s | 751 kB     00:00
    (131/199): gdbm-1.18-1.el8.x86_64.rpm                                                   754 kB/s | 130 kB     00:00
    (132/199): libdb-utils-5.3.28-42.el8_4.x86_64.rpm                                       2.0 MB/s | 150 kB     00:00
    (133/199): trousers-lib-0.3.15-1.el8.x86_64.rpm                                         3.2 MB/s | 168 kB     00:00
    (134/199): fuse-overlayfs-1.7.1-1.module_el8.5.0+890+6b136101.x86_64.rpm                1.1 MB/s |  73 kB     00:00
    (135/199): openssl-1.1.1k-5.el8_5.x86_64.rpm                                            8.0 MB/s | 709 kB     00:00
    (136/199): gdbm-libs-1.18-1.el8.x86_64.rpm                                              324 kB/s |  60 kB     00:00
    (137/199): tzdata-2021e-1.el8.noarch.rpm                                                5.0 MB/s | 474 kB     00:00
    (138/199): gettext-0.19.8.1-17.el8.x86_64.rpm                                           8.5 MB/s | 1.1 MB     00:00
    (139/199): openssl-libs-1.1.1k-5.el8_5.x86_64.rpm                                        12 MB/s | 1.5 MB     00:00
    (140/199): gettext-libs-0.19.8.1-17.el8.x86_64.rpm                                      3.2 MB/s | 314 kB     00:00
    (141/199): openssl-pkcs11-0.4.10-2.el8.x86_64.rpm                                       1.3 MB/s |  66 kB     00:00
    (142/199): os-prober-1.74-9.el8.x86_64.rpm                                              853 kB/s |  51 kB     00:00
    (143/199): p11-kit-0.23.22-1.el8.x86_64.rpm                                             4.7 MB/s | 324 kB     00:00
    (144/199): util-linux-2.32.1-28.el8.x86_64.rpm                                           16 MB/s | 2.5 MB     00:00
    (145/199): glib2-2.56.4-156.el8.x86_64.rpm                                               15 MB/s | 2.5 MB     00:00
    (146/199): libfdisk-2.32.1-28.el8.x86_64.rpm                                            2.7 MB/s | 251 kB     00:00
    (147/199): p11-kit-trust-0.23.22-1.el8.x86_64.rpm                                       734 kB/s | 137 kB     00:00
    (148/199): pam-1.3.1-15.el8.x86_64.rpm                                                  4.1 MB/s | 739 kB     00:00
    (149/199): glibc-2.28-164.el8.x86_64.rpm                                                 19 MB/s | 3.6 MB     00:00
    (150/199): glibc-common-2.28-164.el8.x86_64.rpm                                          13 MB/s | 1.3 MB     00:00
    (151/199): libffi-3.1-22.el8.x86_64.rpm                                                 481 kB/s |  37 kB     00:00
    (152/199): glibc-all-langpacks-2.28-164.el8.x86_64.rpm                                   38 MB/s |  25 MB     00:00
    (153/199): which-2.21-16.el8.x86_64.rpm                                                 148 kB/s |  49 kB     00:00
    (154/199): libgcc-8.5.0-4.el8_5.x86_64.rpm                                              1.3 MB/s |  79 kB     00:00
    (155/199): pciutils-3.7.0-1.el8.x86_64.rpm                                              1.6 MB/s | 105 kB     00:00
    (156/199): libgcrypt-1.8.5-6.el8.x86_64.rpm                                             4.9 MB/s | 463 kB     00:00
    (157/199): pciutils-libs-3.7.0-1.el8.x86_64.rpm                                         906 kB/s |  54 kB     00:00
    (158/199): pcre-8.42-6.el8.x86_64.rpm                                                   2.9 MB/s | 211 kB     00:00
    (159/199): xz-5.2.4-3.el8.x86_64.rpm                                                    2.1 MB/s | 153 kB     00:00
    (160/199): docker-ce-rootless-extras-20.10.18-3.el8.x86_64.rpm                          133 kB/s | 4.6 MB     00:35
    (161/199): libgomp-8.5.0-4.el8_5.x86_64.rpm                                             1.8 MB/s | 206 kB     00:00
    (162/199): xz-libs-5.2.4-3.el8.x86_64.rpm                                               647 kB/s |  94 kB     00:00
    (163/199): libgpg-error-1.31-1.el8.x86_64.rpm                                           2.5 MB/s | 242 kB     00:00
    (164/199): pcre2-10.32-2.el8.x86_64.rpm                                                 1.7 MB/s | 246 kB     00:00
    (165/199): zlib-1.2.11-17.el8.x86_64.rpm                                                972 kB/s | 102 kB     00:00
    (166/199): docker-scan-plugin-0.17.0-3.el8.x86_64.rpm                                   132 kB/s | 3.8 MB     00:29
    (167/199): libibverbs-35.0-1.el8.x86_64.rpm                                             2.1 MB/s | 335 kB     00:00
    (168/199): libidn2-2.2.0-1.el8.x86_64.rpm                                               1.0 MB/s |  94 kB     00:00
    (169/199): libkcapi-1.2.0-2.el8.x86_64.rpm                                              913 kB/s |  48 kB     00:00
    (170/199): libkcapi-hmaccalc-1.2.0-2.el8.x86_64.rpm                                     478 kB/s |  31 kB     00:00
    (171/199): libmnl-1.0.4-6.el8.x86_64.rpm                                                173 kB/s |  30 kB     00:00
    (172/199): pigz-2.4-4.el8.x86_64.rpm                                                    1.0 MB/s |  79 kB     00:00
    (173/199): platform-python-3.6.8-41.el8.x86_64.rpm                                      1.4 MB/s |  85 kB     00:00
    (174/199): platform-python-pip-9.0.3-20.el8.noarch.rpm                                   13 MB/s | 1.7 MB     00:00
    (175/199): libmount-2.32.1-28.el8.x86_64.rpm                                            2.9 MB/s | 234 kB     00:00
    (176/199): platform-python-setuptools-39.2.0-6.el8.noarch.rpm                           6.5 MB/s | 632 kB     00:00
    (177/199): policycoreutils-2.9-16.el8.x86_64.rpm                                        2.5 MB/s | 373 kB     00:00
    (178/199): container-selinux-2.167.0-1.module_el8.5.0+911+f19012f9.noarch.rpm           574 kB/s |  54 kB     00:00
    (179/199): libnetfilter_conntrack-1.0.6-5.el8.x86_64.rpm                                742 kB/s |  65 kB     00:00
    (180/199): libslirp-4.4.0-1.module_el8.5.0+890+6b136101.x86_64.rpm                      1.4 MB/s |  70 kB     00:00
    (181/199): policycoreutils-python-utils-2.9-16.el8.noarch.rpm                           3.3 MB/s | 252 kB     00:00
    (182/199): libnfnetlink-1.0.1-13.el8.x86_64.rpm                                         218 kB/s |  33 kB     00:00
    (183/199): libnftnl-1.1.5-4.el8.x86_64.rpm                                              1.0 MB/s |  83 kB     00:00
    (184/199): popt-1.18-1.el8.x86_64.rpm                                                   1.0 MB/s |  61 kB     00:00
    (185/199): libnghttp2-1.33.0-3.el8_2.1.x86_64.rpm                                       1.1 MB/s |  77 kB     00:00
    (186/199): libnl3-3.5.0-1.el8.x86_64.rpm                                                4.6 MB/s | 320 kB     00:00
    (187/199): procps-ng-3.3.15-6.el8.x86_64.rpm                                            4.1 MB/s | 329 kB     00:00
    (188/199): libnsl2-1.2.0-2.20180605git4a062cf.el8.x86_64.rpm                            358 kB/s |  58 kB     00:00
    (189/199): publicsuffix-list-dafsa-20180723-1.el8.noarch.rpm                            600 kB/s |  56 kB     00:00
    (190/199): python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64.rpm                     1.7 MB/s |  86 kB     00:00
    (191/199): libpcap-1.9.1-5.el8.x86_64.rpm                                               2.3 MB/s | 169 kB     00:00
    (192/199): libpsl-0.20.2-6.el8.x86_64.rpm                                               1.0 MB/s |  61 kB     00:00
    (193/199): libpwquality-1.4.4-3.el8.x86_64.rpm                                          1.3 MB/s | 107 kB     00:00
    (194/199): python3-libs-3.6.8-41.el8.x86_64.rpm                                          31 MB/s | 7.8 MB     00:00
    (195/199): python3-libselinux-2.9-5.el8.x86_64.rpm                                      3.7 MB/s | 283 kB     00:00
    (196/199): python3-libsemanage-2.9-6.el8.x86_64.rpm                                     1.7 MB/s | 127 kB     00:00
    (197/199): libseccomp-2.5.1-1.el8.x86_64.rpm                                            1.1 MB/s |  71 kB     00:00
    (198/199): docker-ce-cli-20.10.18-3.el8.x86_64.rpm                                      133 kB/s |  30 MB     03:46
    (199/199): containerd.io-1.6.8-3.1.el8.x86_64.rpm                                       133 kB/s |  33 MB     04:14


所有的安装包及依赖包总计有199个之多,这里面有依赖的依赖,如果手动下载......

2 删除已安装的docker

查看已安装的docker包

[root@ ~]#  yum list installed |grep dockercontainerd.io.x86_64                  1.6.7-3.1.el8                           @docker-ce-stable
docker-ce.x86_64                      3:20.10.17-3.el8                        @docker-ce-stable
docker-ce-cli.x86_64                  1:20.10.17-3.el8                        @docker-ce-stable
docker-ce-rootless-extras.x86_64      20.10.17-3.el8                          @docker-ce-stable
docker-scan-plugin.x86_64             0.17.0-3.el8                            @docker-ce-stable

先删除docker-ce

[root@ ~]# yum -y remove docker-ce.x86_64Dependencies resolved.
======================================================================================================================== Package                         Architecture Version                                     Repository               Size
========================================================================================================================Removing:
 docker-ce                       x86_64       3:20.10.17-3.el8                            @docker-ce-stable        95 M
Removing unused dependencies:
 containerd.io                   x86_64       1.6.7-3.1.el8                               @docker-ce-stable       125 M
 docker-ce-rootless-extras       x86_64       20.10.17-3.el8                              @docker-ce-stable        16 M
 fuse-common                     x86_64       3.2.1-12.el8                                @base                   4.7 k
 fuse-overlayfs                  x86_64       1.7.1-1.module_el8.5.0+890+6b136101         @AppStream              145 k
 fuse3                           x86_64       3.2.1-12.el8                                @base                    90 k
 fuse3-libs                      x86_64       3.2.1-12.el8                                @base                   279 k
 libcgroup                       x86_64       0.41-19.el8                                 @base                   136 k
 libslirp                        x86_64       4.4.0-1.module_el8.5.0+890+6b136101         @AppStream              134 k
 slirp4netns                     x86_64       1.1.8-1.module_el8.5.0+890+6b136101         @AppStream               98 k
Transaction Summary
========================================================================================================================Remove  10 Packages
Freed space: 237 M
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                1/1
  Running scriptlet: docker-ce-3:20.10.17-3.el8.x86_64                                                              1/1
  Running scriptlet: docker-ce-3:20.10.17-3.el8.x86_64                                                             1/10
  Erasing          : docker-ce-3:20.10.17-3.el8.x86_64                                                             1/10
  Running scriptlet: docker-ce-3:20.10.17-3.el8.x86_64                                                             1/10
  Running scriptlet: docker-ce-rootless-extras-20.10.17-3.el8.x86_64                                               2/10
  Erasing          : docker-ce-rootless-extras-20.10.17-3.el8.x86_64                                               2/10
  Running scriptlet: docker-ce-rootless-extras-20.10.17-3.el8.x86_64                                               2/10
  Running scriptlet: containerd.io-1.6.7-3.1.el8.x86_64                                                            3/10
  Erasing          : containerd.io-1.6.7-3.1.el8.x86_64                                                            3/10
  Running scriptlet: containerd.io-1.6.7-3.1.el8.x86_64                                                            3/10
  Erasing          : fuse-overlayfs-1.7.1-1.module_el8.5.0+890+6b136101.x86_64                                     4/10
  Erasing          : slirp4netns-1.1.8-1.module_el8.5.0+890+6b136101.x86_64                                        5/10
  Erasing          : fuse3-3.2.1-12.el8.x86_64                                                                     6/10
  Erasing          : fuse-common-3.2.1-12.el8.x86_64                                                               7/10
  Erasing          : libslirp-4.4.0-1.module_el8.5.0+890+6b136101.x86_64                                           8/10
  Erasing          : fuse3-libs-3.2.1-12.el8.x86_64                                                                9/10
  Running scriptlet: fuse3-libs-3.2.1-12.el8.x86_64                                                                9/10
  Erasing          : libcgroup-0.41-19.el8.x86_64                                                                 10/10
  Running scriptlet: libcgroup-0.41-19.el8.x86_64                                                                 10/10
  Verifying        : containerd.io-1.6.7-3.1.el8.x86_64                                                            1/10
  Verifying        : docker-ce-3:20.10.17-3.el8.x86_64                                                             2/10
  Verifying        : docker-ce-rootless-extras-20.10.17-3.el8.x86_64                                               3/10
  Verifying        : fuse-common-3.2.1-12.el8.x86_64                                                               4/10
  Verifying        : fuse-overlayfs-1.7.1-1.module_el8.5.0+890+6b136101.x86_64                                     5/10
  Verifying        : fuse3-3.2.1-12.el8.x86_64                                                                     6/10
  Verifying        : fuse3-libs-3.2.1-12.el8.x86_64                                                                7/10
  Verifying        : libcgroup-0.41-19.el8.x86_64                                                                  8/10
  Verifying        : libslirp-4.4.0-1.module_el8.5.0+890+6b136101.x86_64                                           9/10
  Verifying        : slirp4netns-1.1.8-1.module_el8.5.0+890+6b136101.x86_64                                       10/10
Removed:
  containerd.io-1.6.7-3.1.el8.x86_64                           docker-ce-3:20.10.17-3.el8.x86_64
  docker-ce-rootless-extras-20.10.17-3.el8.x86_64              fuse-common-3.2.1-12.el8.x86_64
  fuse-overlayfs-1.7.1-1.module_el8.5.0+890+6b136101.x86_64    fuse3-3.2.1-12.el8.x86_64
  fuse3-libs-3.2.1-12.el8.x86_64                               libcgroup-0.41-19.el8.x86_64
  libslirp-4.4.0-1.module_el8.5.0+890+6b136101.x86_64          slirp4netns-1.1.8-1.module_el8.5.0+890+6b136101.x86_64

然后删除docker-ce-cli包

[root@ ~]# yum -y remove docker-ce-cli.x86_64  Dependencies resolved.
========================================================================================================================   Package                         Architecture        Version                       Repository                      Size
========================================================================================================================  Removing:
   docker-ce-cli                   x86_64              1:20.10.17-3.el8              @docker-ce-stable              140 M
  Removing dependent packages:
   docker-scan-plugin              x86_64              0.17.0-3.el8                  @docker-ce-stable               13 M
  Transaction Summary
========================================================================================================================  Remove  2 Packages
  Freed space: 153 M
  Running transaction check
  Transaction check succeeded.
  Running transaction test
  Transaction test succeeded.
  Running transaction
    Preparing        :                                                                                                1/1
    Erasing          : docker-ce-cli-1:20.10.17-3.el8.x86_64                                                          1/2
    Running scriptlet: docker-scan-plugin-0.17.0-3.el8.x86_64                                                         2/2
    Erasing          : docker-scan-plugin-0.17.0-3.el8.x86_64                                                         2/2
    Running scriptlet: docker-scan-plugin-0.17.0-3.el8.x86_64                                                         2/2
    Verifying        : docker-ce-cli-1:20.10.17-3.el8.x86_64                                                          1/2
    Verifying        : docker-scan-plugin-0.17.0-3.el8.x86_64                                                         2/2
  Removed:
    docker-ce-cli-1:20.10.17-3.el8.x86_64                      docker-scan-plugin-0.17.0-3.el8.x86_64
  Complete!

查看一下系统上已无docker相关包。

[root@ ~]#  yum list installed |grep docker[root@ ~]#

3 离线安装docker

    安装及依赖包下载完之后,安装就比较简单了,切换到安装包所在目录,使用yum命令本地安装即可

[root@ docker_package]# yum localinstall *.rpmLast metadata expiration check: 0:32:03 ago on Thu 20 Oct 202209:32:14 AM CST.
Package acl-2.2.53-1.el8.x86_64 is already installed.
Package audit-libs-3.0-0.17.20191104git1c2f876.el8.x86_64 is already installed.
Package basesystem-11-5.el8.noarch is already installed.
Package bash-4.4.20-2.el8.x86_64 is already installed.
Package brotli-1.0.6-3.el8.x86_64 is already installed.
Package bzip2-libs-1.0.6-26.el8.x86_64 is already installed.
Package ca-certificates-2021.2.50-80.0.el8_4.noarch is already installed.
Package centos-gpg-keys-1:8-3.el8.noarch is already installed.
Package centos-linux-release-8.5-1.2111.el8.noarch is already installed.
Package centos-linux-repos-8-3.el8.noarch is already installed.
Package checkpolicy-2.9-1.el8.x86_64 is already installed.
Package chkconfig-1.19.1-1.el8.x86_64 is already installed.
Package container-selinux-2:2.167.0-1.module_el8.5.0+911+f19012f9.noarch is already installed.
Package coreutils-8.30-12.el8.x86_64 is already installed.
Package coreutils-common-8.30-12.el8.x86_64 is already installed.
Package cpio-2.12-10.el8.x86_64 is already installed.
Package cracklib-2.9.6-15.el8.x86_64 is already installed.
Package cracklib-dicts-2.9.6-15.el8.x86_64 is already installed.
Package crypto-policies-20210617-1.gitc776d3e.el8.noarch is already installed.
Package crypto-policies-scripts-20210617-1.gitc776d3e.el8.noarch is already installed.
Package cryptsetup-libs-2.3.3-4.el8.x86_64 is already installed.
Package curl-7.61.1-22.el8.x86_64 is already installed.
Package cyrus-sasl-lib-2.1.27-5.el8.x86_64 is already installed.
Package dbus-1:1.12.8-14.el8.x86_64 is already installed.
Package dbus-common-1:1.12.8-14.el8.noarch is already installed.
Package dbus-daemon-1:1.12.8-14.el8.x86_64 is already installed.
Package dbus-libs-1:1.12.8-14.el8.x86_64 is already installed.
Package dbus-tools-1:1.12.8-14.el8.x86_64 is already installed.
Package device-mapper-8:1.02.177-10.el8.x86_64 is already installed.
Package device-mapper-libs-8:1.02.177-10.el8.x86_64 is already installed.
Package diffutils-3.6-6.el8.x86_64 is already installed.
Package dracut-049-191.git20210920.el8.x86_64 is already installed.
Package elfutils-debuginfod-client-0.185-1.el8.x86_64 is already installed.
Package elfutils-default-yama-scope-0.185-1.el8.noarch is already installed.
Package elfutils-libelf-0.185-1.el8.x86_64 is already installed.
Package elfutils-libs-0.185-1.el8.x86_64 is already installed.
Package expat-2.2.5-4.el8.x86_64 is already installed.
Package file-5.33-20.el8.x86_64 is already installed.
Package file-libs-5.33-20.el8.x86_64 is already installed.
Package filesystem-3.8-6.el8.x86_64 is already installed.
Package findutils-1:4.6.0-20.el8.x86_64 is already installed.
Package gawk-4.2.1-2.el8.x86_64 is already installed.
Package gdbm-1:1.18-1.el8.x86_64 is already installed.
Package gdbm-libs-1:1.18-1.el8.x86_64 is already installed.
Package gettext-0.19.8.1-17.el8.x86_64 is already installed.
Package gettext-libs-0.19.8.1-17.el8.x86_64 is already installed.
Package glib2-2.56.4-156.el8.x86_64 is already installed.
Package glibc-2.28-164.el8.x86_64 is already installed.
Package glibc-common-2.28-164.el8.x86_64 is already installed.
Package gmp-1:6.1.2-10.el8.x86_64 is already installed.
Package gnutls-3.6.16-4.el8.x86_64 is already installed.
Package grep-3.1-6.el8.x86_64 is already installed.
Package grub2-common-1:2.02-106.el8.noarch is already installed.
Package grub2-tools-1:2.02-106.el8.x86_64 is already installed.
Package grub2-tools-minimal-1:2.02-106.el8.x86_64 is already installed.
Package grubby-8.40-42.el8.x86_64 is already installed.
Package gzip-1.9-12.el8.x86_64 is already installed.
Package hardlink-1:1.3-6.el8.x86_64 is already installed.
Package hwdata-0.314-8.10.el8.noarch is already installed.
Package info-6.5-6.el8.x86_64 is already installed.
Package iptables-1.8.4-20.el8.x86_64 is already installed.
Package iptables-libs-1.8.4-20.el8.x86_64 is already installed.
Package json-c-0.13.1-2.el8.x86_64 is already installed.
Package kbd-2.0.4-10.el8.x86_64 is already installed.
Package kbd-legacy-2.0.4-10.el8.noarch is already installed.
Package kbd-misc-2.0.4-10.el8.noarch is already installed.
Package keyutils-libs-1.5.10-9.el8.x86_64 is already installed.
Package kmod-25-18.el8.x86_64 is already installed.
Package kmod-libs-25-18.el8.x86_64 is already installed.
Package kpartx-0.8.4-17.el8.x86_64 is already installed.
Package krb5-libs-1.18.2-14.el8.x86_64 is already installed.
Package libacl-2.2.53-1.el8.x86_64 is already installed.
Package libarchive-3.3.3-1.el8.x86_64 is already installed.
Package libattr-2.4.48-3.el8.x86_64 is already installed.
Package libblkid-2.32.1-28.el8.x86_64 is already installed.
Package libcap-2.26-5.el8.x86_64 is already installed.
Package libcap-ng-0.7.11-1.el8.x86_64 is already installed.
Package libcom_err-1.45.6-2.el8.x86_64 is already installed.
Package libcroco-0.6.12-4.el8_2.1.x86_64 is already installed.
Package libcurl-7.61.1-22.el8.x86_64 is already installed.
Package libdb-5.3.28-42.el8_4.x86_64 is already installed.
Package libdb-utils-5.3.28-42.el8_4.x86_64 is already installed.
Package libfdisk-2.32.1-28.el8.x86_64 is already installed.
Package libffi-3.1-22.el8.x86_64 is already installed.
Package libgcc-8.5.0-4.el8_5.x86_64 is already installed.
Package libgcrypt-1.8.5-6.el8.x86_64 is already installed.
Package libgomp-8.5.0-4.el8_5.x86_64 is already installed.
Package libgpg-error-1.31-1.el8.x86_64 is already installed.
Package libibverbs-35.0-1.el8.x86_64 is already installed.
Package libidn2-2.2.0-1.el8.x86_64 is already installed.
Package libkcapi-1.2.0-2.el8.x86_64 is already installed.
Package libkcapi-hmaccalc-1.2.0-2.el8.x86_64 is already installed.
Package libmnl-1.0.4-6.el8.x86_64 is already installed.
Package libmount-2.32.1-28.el8.x86_64 is already installed.
Package libnetfilter_conntrack-1.0.6-5.el8.x86_64 is already installed.
Package libnfnetlink-1.0.1-13.el8.x86_64 is already installed.
Package libnftnl-1.1.5-4.el8.x86_64 is already installed.
Package libnghttp2-1.33.0-3.el8_2.1.x86_64 is already installed.
Package libnl3-3.5.0-1.el8.x86_64 is already installed.
Package libnsl2-1.2.0-2.20180605git4a062cf.el8.x86_64 is already installed.
Package libpcap-14:1.9.1-5.el8.x86_64 is already installed.
Package libpsl-0.20.2-6.el8.x86_64 is already installed.
Package libpwquality-1.4.4-3.el8.x86_64 is already installed.
Package libseccomp-2.5.1-1.el8.x86_64 is already installed.
Package libselinux-2.9-5.el8.x86_64 is already installed.
Package libselinux-utils-2.9-5.el8.x86_64 is already installed.
Package libsemanage-2.9-6.el8.x86_64 is already installed.
Package libsepol-2.9-3.el8.x86_64 is already installed.
Package libsigsegv-2.11-5.el8.x86_64 is already installed.
Package libsmartcols-2.32.1-28.el8.x86_64 is already installed.
Package libssh-0.9.4-3.el8.x86_64 is already installed.
Package libssh-config-0.9.4-3.el8.noarch is already installed.
Package libstdc++-8.5.0-4.el8_5.x86_64 is already installed.
Package libtasn1-4.13-3.el8.x86_64 is already installed.
Package libtirpc-1.1.4-5.el8.x86_64 is already installed.
Package libunistring-0.9.9-3.el8.x86_64 is already installed.
Package libutempter-1.1.6-14.el8.x86_64 is already installed.
Package libuuid-2.32.1-28.el8.x86_64 is already installed.
Package libverto-0.3.0-5.el8.x86_64 is already installed.
Package libxcrypt-4.1.1-6.el8.x86_64 is already installed.
Package libxkbcommon-0.9.1-1.el8.x86_64 is already installed.
Package libxml2-2.9.7-9.el8_4.2.x86_64 is already installed.
Package libzstd-1.4.4-1.el8.x86_64 is already installed.
Package lua-libs-5.3.4-12.el8.x86_64 is already installed.
Package lz4-libs-1.8.3-3.el8_4.x86_64 is already installed.
Package memstrack-0.1.11-1.el8.x86_64 is already installed.
Package mpfr-3.1.6-1.el8.x86_64 is already installed.
Package ncurses-6.1-9.20180224.el8.x86_64 is already installed.
Package ncurses-base-6.1-9.20180224.el8.noarch is already installed.
Package ncurses-libs-6.1-9.20180224.el8.x86_64 is already installed.
Package nettle-3.4.1-7.el8.x86_64 is already installed.
Package openldap-2.4.46-18.el8.x86_64 is already installed.
Package openssl-1:1.1.1k-5.el8_5.x86_64 is already installed.
Package openssl-libs-1:1.1.1k-5.el8_5.x86_64 is already installed.
Package openssl-pkcs11-0.4.10-2.el8.x86_64 is already installed.
Package os-prober-1.74-9.el8.x86_64 is already installed.
Package p11-kit-0.23.22-1.el8.x86_64 is already installed.
Package p11-kit-trust-0.23.22-1.el8.x86_64 is already installed.
Package pam-1.3.1-15.el8.x86_64 is already installed.
Package pciutils-3.7.0-1.el8.x86_64 is already installed.
Package pciutils-libs-3.7.0-1.el8.x86_64 is already installed.
Package pcre2-10.32-2.el8.x86_64 is already installed.
Package pcre-8.42-6.el8.x86_64 is already installed.
Package pigz-2.4-4.el8.x86_64 is already installed.
Package platform-python-3.6.8-41.el8.x86_64 is already installed.
Package platform-python-pip-9.0.3-20.el8.noarch is already installed.
Package platform-python-setuptools-39.2.0-6.el8.noarch is already installed.
Package policycoreutils-2.9-16.el8.x86_64 is already installed.
Package policycoreutils-python-utils-2.9-16.el8.noarch is already installed.
Package popt-1.18-1.el8.x86_64 is already installed.
Package procps-ng-3.3.15-6.el8.x86_64 is already installed.
Package publicsuffix-list-dafsa-20180723-1.el8.noarch is already installed.
Package python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64 is already installed.
Package python3-libs-3.6.8-41.el8.x86_64 is already installed.
Package python3-libselinux-2.9-5.el8.x86_64 is already installed.
Package python3-libsemanage-2.9-6.el8.x86_64 is already installed.
Package python3-pip-wheel-9.0.3-20.el8.noarch is already installed.
Package python3-policycoreutils-2.9-16.el8.noarch is already installed.
Package python3-setools-4.3.0-2.el8.x86_64 is already installed.
Package python3-setuptools-wheel-39.2.0-6.el8.noarch is already installed.
Package rdma-core-35.0-1.el8.x86_64 is already installed.
Package readline-7.0-10.el8.x86_64 is already installed.
Package rpm-4.14.3-19.el8.x86_64 is already installed.
Package rpm-libs-4.14.3-19.el8.x86_64 is already installed.
Package rpm-plugin-selinux-4.14.3-19.el8.x86_64 is already installed.
Package sed-4.5-2.el8.x86_64 is already installed.
Package selinux-policy-3.14.3-80.el8_5.2.noarch is already installed.
Package selinux-policy-targeted-3.14.3-80.el8_5.2.noarch is already installed.
Package setup-2.12.2-6.el8.noarch is already installed.
Package shadow-utils-2:4.6-14.el8.x86_64 is already installed.
Package shared-mime-info-1.9-3.el8.x86_64 is already installed.
Package sqlite-libs-3.26.0-15.el8.x86_64 is already installed.
Package systemd-239-51.el8_5.2.x86_64 is already installed.
Package systemd-libs-239-51.el8_5.2.x86_64 is already installed.
Package systemd-pam-239-51.el8_5.2.x86_64 is already installed.
Package systemd-udev-239-51.el8_5.2.x86_64 is already installed.
Package tar-2:1.30-5.el8.x86_64 is already installed.
Package trousers-0.3.15-1.el8.x86_64 is already installed.
Package trousers-lib-0.3.15-1.el8.x86_64 is already installed.
Package tzdata-2021e-1.el8.noarch is already installed.
Package util-linux-2.32.1-28.el8.x86_64 is already installed.
Package which-2.21-16.el8.x86_64 is already installed.
Package xkeyboard-config-2.28-1.el8.noarch is already installed.
Package xz-5.2.4-3.el8.x86_64 is already installed.
Package xz-libs-5.2.4-3.el8.x86_64 is already installed.
Package zlib-1.2.11-17.el8.x86_64 is already installed.
Dependencies resolved.
======================================================================================================================== Package                          Architecture  Version                                       Repository           Size
========================================================================================================================Installing:
 containerd.io                    x86_64        1.6.8-3.1.el8                                 @commandline         33 M
 docker-ce                        x86_64        3:20.10.18-3.el8                              @commandline         21 M
 docker-ce-cli                    x86_64        1:20.10.18-3.el8                              @commandline         30 M
 docker-ce-rootless-extras        x86_64        20.10.18-3.el8                                @commandline        4.6 M
 docker-scan-plugin               x86_64        0.17.0-3.el8                                  @commandline        3.8 M
 fuse-common                      x86_64        3.2.1-12.el8                                  @commandline         21 k
 fuse-overlayfs                   x86_64        1.7.1-1.module_el8.5.0+890+6b136101           @commandline         73 k
 fuse3                            x86_64        3.2.1-12.el8                                  @commandline         50 k
 fuse3-libs                       x86_64        3.2.1-12.el8                                  @commandline         94 k
 glibc-all-langpacks              x86_64        2.28-164.el8                                  @commandline         25 M
 libcgroup                        x86_64        0.41-19.el8                                   @commandline         70 k
 libslirp                         x86_64        4.4.0-1.module_el8.5.0+890+6b136101           @commandline         70 k
 slirp4netns                      x86_64        1.1.8-1.module_el8.5.0+890+6b136101           @commandline         51 k
Transaction Summary
========================================================================================================================Install  13 Packages
Total size: 118 M
Installed size: 780 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                1/1
  Installing       : docker-scan-plugin-0.17.0-3.el8.x86_64                                                        1/13
  Running scriptlet: docker-scan-plugin-0.17.0-3.el8.x86_64                                                        1/13
  Installing       : docker-ce-cli-1:20.10.18-3.el8.x86_64                                                         2/13
  Running scriptlet: docker-ce-cli-1:20.10.18-3.el8.x86_64                                                         2/13
  Installing       : libslirp-4.4.0-1.module_el8.5.0+890+6b136101.x86_64                                           3/13
  Installing       : slirp4netns-1.1.8-1.module_el8.5.0+890+6b136101.x86_64                                        4/13
  Running scriptlet: libcgroup-0.41-19.el8.x86_64                                                                  5/13
  Installing       : libcgroup-0.41-19.el8.x86_64                                                                  5/13
  Running scriptlet: libcgroup-0.41-19.el8.x86_64                                                                  5/13
  Installing       : fuse-common-3.2.1-12.el8.x86_64                                                               6/13
  Installing       : fuse3-3.2.1-12.el8.x86_64                                                                     7/13
  Installing       : fuse3-libs-3.2.1-12.el8.x86_64                                                                8/13
  Running scriptlet: fuse3-libs-3.2.1-12.el8.x86_64                                                                8/13
  Installing       : fuse-overlayfs-1.7.1-1.module_el8.5.0+890+6b136101.x86_64                                     9/13
  Running scriptlet: fuse-overlayfs-1.7.1-1.module_el8.5.0+890+6b136101.x86_64                                     9/13
  Installing       : containerd.io-1.6.8-3.1.el8.x86_64                                                           10/13
  Running scriptlet: containerd.io-1.6.8-3.1.el8.x86_64                                                           10/13
  Installing       : docker-ce-rootless-extras-20.10.18-3.el8.x86_64                                              11/13
  Running scriptlet: docker-ce-rootless-extras-20.10.18-3.el8.x86_64                                              11/13
  Installing       : docker-ce-3:20.10.18-3.el8.x86_64                                                            12/13
  Running scriptlet: docker-ce-3:20.10.18-3.el8.x86_64                                                            12/13
  Installing       : glibc-all-langpacks-2.28-164.el8.x86_64                                                      13/13
  Running scriptlet: glibc-all-langpacks-2.28-164.el8.x86_64                                                      13/13
  Verifying        : containerd.io-1.6.8-3.1.el8.x86_64                                                            1/13
  Verifying        : docker-ce-3:20.10.18-3.el8.x86_64                                                             2/13
  Verifying        : docker-ce-cli-1:20.10.18-3.el8.x86_64                                                         3/13
  Verifying        : docker-ce-rootless-extras-20.10.18-3.el8.x86_64                                               4/13
  Verifying        : docker-scan-plugin-0.17.0-3.el8.x86_64                                                        5/13
  Verifying        : fuse3-3.2.1-12.el8.x86_64                                                                     6/13
  Verifying        : fuse3-libs-3.2.1-12.el8.x86_64                                                                7/13
  Verifying        : fuse-common-3.2.1-12.el8.x86_64                                                               8/13
  Verifying        : fuse-overlayfs-1.7.1-1.module_el8.5.0+890+6b136101.x86_64                                     9/13
  Verifying        : glibc-all-langpacks-2.28-164.el8.x86_64                                                      10/13
  Verifying        : libcgroup-0.41-19.el8.x86_64                                                                 11/13
  Verifying        : libslirp-4.4.0-1.module_el8.5.0+890+6b136101.x86_64                                          12/13
  Verifying        : slirp4netns-1.1.8-1.module_el8.5.0+890+6b136101.x86_64                                       13/13
Installed:
  containerd.io-1.6.8-3.1.el8.x86_64                            docker-ce-3:20.10.18-3.el8.x86_64
  docker-ce-cli-1:20.10.18-3.el8.x86_64                         docker-ce-rootless-extras-20.10.18-3.el8.x86_64
  docker-scan-plugin-0.17.0-3.el8.x86_64                        fuse-common-3.2.1-12.el8.x86_64
  fuse-overlayfs-1.7.1-1.module_el8.5.0+890+6b136101.x86_64     fuse3-3.2.1-12.el8.x86_64
  fuse3-libs-3.2.1-12.el8.x86_64                                glibc-all-langpacks-2.28-164.el8.x86_64
  libcgroup-0.41-19.el8.x86_64                                  libslirp-4.4.0-1.module_el8.5.0+890+6b136101.x86_64
  slirp4netns-1.1.8-1.module_el8.5.0+890+6b136101.x86_64
Complete!


安装完后,docker并没有启动

[root@ docker_package]# systectl status docker-bash: systectl: command not found
[root@ docker_package]# systemctl status docker● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: https://docs.docker.com

启动一下再查看状态

[root@ docker_package]# systemctl start docker[root@ docker_package]# systemctl status docker● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: active (running) since Thu 2022-10-2010:06:11 CST; 58s ago
     Docs: https://docs.docker.com
 Main PID: 164837 (dockerd)
    Tasks: 7   Memory: 30.0M
   CGroup: /system.slice/docker.service
           └─164837 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Oct 2010:06:10 iZ2ze0t8khaprrpfvmevjiZ dockerd[164837]: time="2022-10-20T10:06:10.519097458+08:00"level=info msg="[gr>Oct 20 10:06:10 iZ2ze0t8khaprrpfvmevjiZ dockerd[164837]: time="2022-10-20T10:06:10.543296975+08:00" level=warning msg=">
Oct 2010:06:10 iZ2ze0t8khaprrpfvmevjiZ dockerd[164837]: time="2022-10-20T10:06:10.543326630+08:00"level=warning msg=">Oct 20 10:06:10 iZ2ze0t8khaprrpfvmevjiZ dockerd[164837]: time="2022-10-20T10:06:10.543536947+08:00" level=info msg="Loa>
Oct 2010:06:11 iZ2ze0t8khaprrpfvmevjiZ dockerd[164837]: time="2022-10-20T10:06:11.016974140+08:00"level=info msg="Def>Oct 20 10:06:11 iZ2ze0t8khaprrpfvmevjiZ dockerd[164837]: time="2022-10-20T10:06:11.162497151+08:00" level=info msg="Loa>
Oct 2010:06:11 iZ2ze0t8khaprrpfvmevjiZ dockerd[164837]: time="2022-10-20T10:06:11.202560686+08:00"level=info msg="Doc>Oct 20 10:06:11 iZ2ze0t8khaprrpfvmevjiZ dockerd[164837]: time="2022-10-20T10:06:11.202651469+08:00" level=info msg="Dae>
Oct 2010:06:11 iZ2ze0t8khaprrpfvmevjiZ systemd[1]: Started Docker Application Container Engine.
Oct 2010:06:11 iZ2ze0t8khaprrpfvmevjiZ dockerd[164837]: time="2022-10-20T10:06:11.236514596+08:00"level=info msg="API>

查看一下docker版本

[root@ docker_package]# docker versionClient: Docker Engine - Community
 Version:           20.10.18
 API version:       1.41
 Go version:        go1.18.6
 Git commit:        b40c2f6
 Built:             Thu Sep  823:11:56 2022 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      trueServer: Docker Engine - Community
 Engine:
  Version:          20.10.18
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.6
  Git commit:       e42327a
  Built:            Thu Sep  823:10:04 2022  OS/Arch:          linux/amd64
  Experimental:     false containerd:
  Version:          1.6.8
  GitCommit:        9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
相关文章
|
14天前
|
NoSQL 关系型数据库 Redis
mall在linux环境下的部署(基于Docker容器),Docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongo
mall在linux环境下的部署(基于Docker容器),docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongodb、minio详细教程,拉取镜像、运行容器
mall在linux环境下的部署(基于Docker容器),Docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongo
|
15天前
|
Ubuntu Linux Docker
Ubuntu 18.04 安装Docker实战案例
关于如何在Ubuntu 18.04系统上安装Docker的实战案例,包括安装步骤、配置镜像加速以及下载和运行Docker镜像的过程。
89 3
Ubuntu 18.04 安装Docker实战案例
|
15天前
|
存储 Linux Docker
CentOS 7.6安装Docker实战案例及存储引擎和服务进程简介
关于如何在CentOS 7.6上安装Docker、介绍Docker存储引擎以及服务进程关系的实战案例。
56 3
CentOS 7.6安装Docker实战案例及存储引擎和服务进程简介
|
1天前
|
Prometheus 监控 Cloud Native
docker安装prometheus+Granfan并监控容器
【9月更文挑战第14天】本文介绍了在Docker中安装Prometheus与Grafana并监控容器的步骤,包括创建配置文件、运行Prometheus与Grafana容器,以及在Grafana中配置数据源和创建监控仪表盘,展示了如何通过Prometheus抓取数据并利用Grafana展示容器的CPU使用率等关键指标。
|
29天前
|
消息中间件 Docker 容器
消息中间件RabbitMQ---Docker安装RabbitMQ、以及RabbitMQ的基本使用【二】
这篇文章提供了RabbitMQ的安装和基本使用教程,包括如何使用Docker拉取RabbitMQ镜像、创建容器、通过浏览器访问管理界面,以及如何创建交换机、队列、绑定和使用direct、fanout和topic三种类型的交换器进行消息发布和接收的测试。
消息中间件RabbitMQ---Docker安装RabbitMQ、以及RabbitMQ的基本使用【二】
|
29天前
|
关系型数据库 MySQL Java
腾讯云服务器的使用、服务器中使用Docker安装常见的软件、如何将一个项目发布到服务器
这篇文章介绍了在腾讯云服务器上使用Docker安装常见软件的过程,包括安装MySQL、Redis和Tomcat,并提供了解决连接问题的方法。同时,还涉及了服务器中安装JDK 1.8的步骤和如何将项目打包部署到服务器上的指导,包括注意事项和操作提示。
腾讯云服务器的使用、服务器中使用Docker安装常见的软件、如何将一个项目发布到服务器
|
29天前
|
应用服务中间件 Docker 容器
在服务器中使用Docker安装Tomcat、同时实现目录挂载、并且部署War包到服务器
这篇文章介绍了在Docker中安装Tomcat的过程,包括搜索Tomcat镜像、拉取镜像、目录挂载的准备、创建并挂载容器,以及如何进入容器和进行测试。文中还说明了如何将WAR包部署到Tomcat服务器并访问部署的应用。
在服务器中使用Docker安装Tomcat、同时实现目录挂载、并且部署War包到服务器
|
19天前
|
Ubuntu Docker 索引
2024年最新版 Ubuntu 20+ 上安装 Docker
这篇文章提供了在Ubuntu 20+版本上安装Docker的详细步骤,包括更新软件包索引、安装依赖包、添加Docker官方GPG密钥、设置Docker稳定版仓库、安装Docker CE以及验证安装是否成功,并指导如何将用户添加到docker组以非root用户身份运行Docker。
|
22天前
|
存储 搜索推荐 应用服务中间件
深入探索Docker 安装 Tomcat
【8月更文挑战第26天】
32 4
|
21天前
|
NoSQL Redis 数据安全/隐私保护
深入探索利用Docker安装Redis
【8月更文挑战第27天】
56 2