系统环境

# cat /etc/redhat-release

Red Hat Enterprise Linux release 8.0 (Ootpa)

安装依赖

# yum install -y yum-utils  device-mapper-persistent-data  lvm2

Last metadata expiration check: 0:33:56 ago on Tue 18 Feb 2020 12:30:53 AM UTC.
Dependencies resolved.
=====================================================================================================================================================================================
 Package                                             Arch                         Version                                   Repository                                          Size
=====================================================================================================================================================================================
Installing:
 device-mapper-persistent-data                       x86_64                       0.8.5-2.el8                               rhui-rhel-8-baseos-rhui-rpms                       473 k
 yum-utils                                           noarch                       4.0.8-3.el8                               rhui-rhel-8-baseos-rhui-rpms                        64 k
     replacing  dnf-utils.noarch 4.0.2.2-3.el8
 lvm2                                                x86_64                       8:2.03.05-5.el8                           rhui-rhel-8-baseos-rhui-rpms                       1.5 M
Upgrading:
 device-mapper                                       x86_64                       8:1.02.163-5.el8                          rhui-rhel-8-baseos-rhui-rpms                       371 k
 dnf-plugins-core                                    noarch                       4.0.8-3.el8                               rhui-rhel-8-baseos-rhui-rpms                        62 k
 libsolv                                             x86_64                       0.7.4-3.el8                               rhui-rhel-8-baseos-rhui-rpms                       351 k
 librepo                                             x86_64                       1.10.3-3.el8                              rhui-rhel-8-baseos-rhui-rpms                        88 k
 python3-librepo                                     x86_64                       1.10.3-3.el8                              rhui-rhel-8-baseos-rhui-rpms                        51 k
 python3-dnf-plugins-core                            noarch                       4.0.8-3.el8                               rhui-rhel-8-baseos-rhui-rpms                       193 k
 device-mapper-libs                                  x86_64                       8:1.02.163-5.el8                          rhui-rhel-8-baseos-rhui-rpms                       403 k
 python3-dnf                                         noarch                       4.2.7-7.el8_1                             rhui-rhel-8-baseos-rhui-rpms                       506 k
 libdnf                                              x86_64                       0.35.1-9.el8_1                            rhui-rhel-8-baseos-rhui-rpms                       606 k
 yum                                                 noarch                       4.2.7-7.el8_1                             rhui-rhel-8-baseos-rhui-rpms                       181 k
 dnf                                                 noarch                       4.2.7-7.el8_1                             rhui-rhel-8-baseos-rhui-rpms                       490 k
 dnf-data                                            noarch                       4.2.7-7.el8_1                             rhui-rhel-8-baseos-rhui-rpms                       139 k
 python3-libdnf                                      x86_64                       0.35.1-9.el8_1                            rhui-rhel-8-baseos-rhui-rpms                       689 k
 python3-hawkey                                      x86_64                       0.35.1-9.el8_1                            rhui-rhel-8-baseos-rhui-rpms                        96 k
Installing dependencies:
 device-mapper-event-libs                            x86_64                       8:1.02.163-5.el8                          rhui-rhel-8-baseos-rhui-rpms                       265 k
 lvm2-libs                                           x86_64                       8:2.03.05-5.el8                           rhui-rhel-8-baseos-rhui-rpms                       1.1 M
 libaio                                              x86_64                       0.3.112-1.el8                             rhui-rhel-8-baseos-rhui-rpms                        33 k
 device-mapper-event                                 x86_64                       8:1.02.163-5.el8                          rhui-rhel-8-baseos-rhui-rpms                       266 k

Transaction Summary
=====================================================================================================================================================================================
Install   7 Packages
Upgrade  14 Packages

Total download size: 7.8 M
Downloading Packages:
(1/21): yum-utils-4.0.8-3.el8.noarch.rpm                                                                                                              58 kB/s |  64 kB     00:01
(2/21): device-mapper-event-libs-1.02.163-5.el8.x86_64.rpm                                                                                           239 kB/s | 265 kB     00:01
(3/21): device-mapper-persistent-data-0.8.5-2.el8.x86_64.rpm                                                                                         418 kB/s | 473 kB     00:01
(4/21): libaio-0.3.112-1.el8.x86_64.rpm                                                                                                              359 kB/s |  33 kB     00:00
(5/21): lvm2-libs-2.03.05-5.el8.x86_64.rpm                                                                                                           8.1 MB/s | 1.1 MB     00:00
(6/21): lvm2-2.03.05-5.el8.x86_64.rpm                                                                                                                9.9 MB/s | 1.5 MB     00:00
(7/21): device-mapper-event-1.02.163-5.el8.x86_64.rpm                                                                                                2.2 MB/s | 266 kB     00:00
(8/21): dnf-plugins-core-4.0.8-3.el8.noarch.rpm                                                                                                      657 kB/s |  62 kB     00:00
(9/21): device-mapper-1.02.163-5.el8.x86_64.rpm                                                                                                      3.1 MB/s | 371 kB     00:00
(10/21): librepo-1.10.3-3.el8.x86_64.rpm                                                                                                             926 kB/s |  88 kB     00:00
(11/21): libsolv-0.7.4-3.el8.x86_64.rpm                                                                                                              3.1 MB/s | 351 kB     00:00
(12/21): python3-librepo-1.10.3-3.el8.x86_64.rpm                                                                                                     514 kB/s |  51 kB     00:00
(13/21): python3-dnf-plugins-core-4.0.8-3.el8.noarch.rpm                                                                                             1.8 MB/s | 193 kB     00:00
(14/21): device-mapper-libs-1.02.163-5.el8.x86_64.rpm                                                                                                3.5 MB/s | 403 kB     00:00
(15/21): python3-dnf-4.2.7-7.el8_1.noarch.rpm                                                                                                        4.1 MB/s | 506 kB     00:00
(16/21): yum-4.2.7-7.el8_1.noarch.rpm                                                                                                                1.7 MB/s | 181 kB     00:00
(17/21): libdnf-0.35.1-9.el8_1.x86_64.rpm                                                                                                            4.9 MB/s | 606 kB     00:00
(18/21): dnf-4.2.7-7.el8_1.noarch.rpm                                                                                                                4.2 MB/s | 490 kB     00:00
(19/21): dnf-data-4.2.7-7.el8_1.noarch.rpm                                                                                                           1.3 MB/s | 139 kB     00:00
(20/21): python3-hawkey-0.35.1-9.el8_1.x86_64.rpm                                                                                                    1.0 MB/s |  96 kB     00:00
(21/21): python3-libdnf-0.35.1-9.el8_1.x86_64.rpm                                                                                                    5.3 MB/s | 689 kB     00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                2.8 MB/s | 7.8 MB     00:02
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                             1/1
  Running scriptlet: librepo-1.10.3-3.el8.x86_64                                                                                                                                 1/1
  Upgrading        : librepo-1.10.3-3.el8.x86_64                                                                                                                                1/36
  Upgrading        : libsolv-0.7.4-3.el8.x86_64                                                                                                                                 2/36
  Installing       : libaio-0.3.112-1.el8.x86_64                                                                                                                                3/36
  Upgrading        : libdnf-0.35.1-9.el8_1.x86_64                                                                                                                               4/36
  Upgrading        : python3-libdnf-0.35.1-9.el8_1.x86_64                                                                                                                       5/36
  Upgrading        : python3-hawkey-0.35.1-9.el8_1.x86_64                                                                                                                       6/36
  Upgrading        : device-mapper-libs-8:1.02.163-5.el8.x86_64                                                                                                                 7/36
  Upgrading        : device-mapper-8:1.02.163-5.el8.x86_64                                                                                                                      8/36
  Installing       : device-mapper-event-libs-8:1.02.163-5.el8.x86_64                                                                                                           9/36
  Installing       : device-mapper-event-8:1.02.163-5.el8.x86_64                                                                                                               10/36
  Running scriptlet: device-mapper-event-8:1.02.163-5.el8.x86_64                                                                                                               10/36
  Installing       : lvm2-libs-8:2.03.05-5.el8.x86_64                                                                                                                          11/36
  Installing       : device-mapper-persistent-data-0.8.5-2.el8.x86_64                                                                                                          12/36
  Upgrading        : dnf-data-4.2.7-7.el8_1.noarch                                                                                                                             13/36
  Upgrading        : python3-dnf-4.2.7-7.el8_1.noarch                                                                                                                          14/36
  Upgrading        : dnf-4.2.7-7.el8_1.noarch                                                                                                                                  15/36
  Running scriptlet: dnf-4.2.7-7.el8_1.noarch                                                                                                                                  15/36
  Upgrading        : python3-dnf-plugins-core-4.0.8-3.el8.noarch                                                                                                               16/36
  Upgrading        : dnf-plugins-core-4.0.8-3.el8.noarch                                                                                                                       17/36
  Installing       : yum-utils-4.0.8-3.el8.noarch                                                                                                                              18/36
  Upgrading        : yum-4.2.7-7.el8_1.noarch                                                                                                                                  19/36
  Installing       : lvm2-8:2.03.05-5.el8.x86_64                                                                                                                               20/36
  Running scriptlet: lvm2-8:2.03.05-5.el8.x86_64                                                                                                                               20/36
  Upgrading        : python3-librepo-1.10.3-3.el8.x86_64                                                                                                                       21/36
  Obsoleting       : dnf-utils-4.0.2.2-3.el8.noarch                                                                                                                            22/36
  Cleanup          : device-mapper-8:1.02.155-6.el8.x86_64                                                                                                                     23/36
  Cleanup          : python3-librepo-1.9.2-1.el8.x86_64                                                                                                                        24/36
  Cleanup          : dnf-plugins-core-4.0.2.2-3.el8.noarch                                                                                                                     25/36
  Cleanup          : python3-dnf-plugins-core-4.0.2.2-3.el8.noarch                                                                                                             26/36
  Cleanup          : yum-4.0.9.2-5.el8.noarch                                                                                                                                  27/36
  Running scriptlet: dnf-4.0.9.2-5.el8.noarch                                                                                                                                  28/36
  Cleanup          : dnf-4.0.9.2-5.el8.noarch                                                                                                                                  28/36
  Running scriptlet: dnf-4.0.9.2-5.el8.noarch                                                                                                                                  28/36
  Cleanup          : python3-dnf-4.0.9.2-5.el8.noarch                                                                                                                          29/36
  Cleanup          : python3-hawkey-0.22.5-5.el8_0.x86_64                                                                                                                      30/36
  Cleanup          : dnf-data-4.0.9.2-5.el8.noarch                                                                                                                             31/36
  Cleanup          : python3-libdnf-0.22.5-5.el8_0.x86_64                                                                                                                      32/36
  Cleanup          : libdnf-0.22.5-5.el8_0.x86_64                                                                                                                              33/36
  Cleanup          : librepo-1.9.2-1.el8.x86_64                                                                                                                                34/36
  Cleanup          : libsolv-0.6.35-6.el8.x86_64                                                                                                                               35/36
  Cleanup          : device-mapper-libs-8:1.02.155-6.el8.x86_64                                                                                                                36/36
  Running scriptlet: device-mapper-libs-8:1.02.155-6.el8.x86_64                                                                                                                36/36
  Verifying        : device-mapper-event-libs-8:1.02.163-5.el8.x86_64                                                                                                           1/36
  Verifying        : device-mapper-persistent-data-0.8.5-2.el8.x86_64                                                                                                           2/36
  Verifying        : yum-utils-4.0.8-3.el8.noarch                                                                                                                               3/36
  Verifying        : dnf-utils-4.0.2.2-3.el8.noarch                                                                                                                             4/36
  Verifying        : lvm2-8:2.03.05-5.el8.x86_64                                                                                                                                5/36
  Verifying        : lvm2-libs-8:2.03.05-5.el8.x86_64                                                                                                                           6/36
  Verifying        : libaio-0.3.112-1.el8.x86_64                                                                                                                                7/36
  Verifying        : device-mapper-event-8:1.02.163-5.el8.x86_64                                                                                                                8/36
  Verifying        : device-mapper-8:1.02.163-5.el8.x86_64                                                                                                                      9/36
  Verifying        : device-mapper-8:1.02.155-6.el8.x86_64                                                                                                                     10/36
  Verifying        : dnf-plugins-core-4.0.8-3.el8.noarch                                                                                                                       11/36
  Verifying        : dnf-plugins-core-4.0.2.2-3.el8.noarch                                                                                                                     12/36
  Verifying        : libsolv-0.7.4-3.el8.x86_64                                                                                                                                13/36
  Verifying        : libsolv-0.6.35-6.el8.x86_64                                                                                                                               14/36
  Verifying        : librepo-1.10.3-3.el8.x86_64                                                                                                                               15/36
  Verifying        : librepo-1.9.2-1.el8.x86_64                                                                                                                                16/36
  Verifying        : python3-librepo-1.10.3-3.el8.x86_64                                                                                                                       17/36
  Verifying        : python3-librepo-1.9.2-1.el8.x86_64                                                                                                                        18/36
  Verifying        : python3-dnf-plugins-core-4.0.8-3.el8.noarch                                                                                                               19/36
  Verifying        : python3-dnf-plugins-core-4.0.2.2-3.el8.noarch                                                                                                             20/36
  Verifying        : device-mapper-libs-8:1.02.163-5.el8.x86_64                                                                                                                21/36
  Verifying        : device-mapper-libs-8:1.02.155-6.el8.x86_64                                                                                                                22/36
  Verifying        : python3-dnf-4.2.7-7.el8_1.noarch                                                                                                                          23/36
  Verifying        : python3-dnf-4.0.9.2-5.el8.noarch                                                                                                                          24/36
  Verifying        : libdnf-0.35.1-9.el8_1.x86_64                                                                                                                              25/36
  Verifying        : libdnf-0.22.5-5.el8_0.x86_64                                                                                                                              26/36
  Verifying        : yum-4.2.7-7.el8_1.noarch                                                                                                                                  27/36
  Verifying        : yum-4.0.9.2-5.el8.noarch                                                                                                                                  28/36
  Verifying        : dnf-4.2.7-7.el8_1.noarch                                                                                                                                  29/36
  Verifying        : dnf-4.0.9.2-5.el8.noarch                                                                                                                                  30/36
  Verifying        : dnf-data-4.2.7-7.el8_1.noarch                                                                                                                             31/36
  Verifying        : dnf-data-4.0.9.2-5.el8.noarch                                                                                                                             32/36
  Verifying        : python3-libdnf-0.35.1-9.el8_1.x86_64                                                                                                                      33/36
  Verifying        : python3-libdnf-0.22.5-5.el8_0.x86_64                                                                                                                      34/36
  Verifying        : python3-hawkey-0.35.1-9.el8_1.x86_64                                                                                                                      35/36
  Verifying        : python3-hawkey-0.22.5-5.el8_0.x86_64                                                                                                                      36/36

Upgraded:
  device-mapper-8:1.02.163-5.el8.x86_64      dnf-plugins-core-4.0.8-3.el8.noarch              libsolv-0.7.4-3.el8.x86_64                      librepo-1.10.3-3.el8.x86_64
  python3-librepo-1.10.3-3.el8.x86_64        python3-dnf-plugins-core-4.0.8-3.el8.noarch      device-mapper-libs-8:1.02.163-5.el8.x86_64      python3-dnf-4.2.7-7.el8_1.noarch
  libdnf-0.35.1-9.el8_1.x86_64               yum-4.2.7-7.el8_1.noarch                         dnf-4.2.7-7.el8_1.noarch                        dnf-data-4.2.7-7.el8_1.noarch
  python3-libdnf-0.35.1-9.el8_1.x86_64       python3-hawkey-0.35.1-9.el8_1.x86_64

Installed:
  device-mapper-persistent-data-0.8.5-2.el8.x86_64   yum-utils-4.0.8-3.el8.noarch   lvm2-8:2.03.05-5.el8.x86_64                   device-mapper-event-libs-8:1.02.163-5.el8.x86_64
  lvm2-libs-8:2.03.05-5.el8.x86_64                   libaio-0.3.112-1.el8.x86_64    device-mapper-event-8:1.02.163-5.el8.x86_64

Complete!

添加Docker Yum源

# yum-config-manager  --add-repo   https://download.docker.com/linux/centos/docker-ce.repo
Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo

安装报错

Error:
 Problem: package docker-ce-3:19.03.6-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed
  - cannot install the best candidate for the job
  - package containerd.io-1.2.10-3.2.el7.x86_64 is excluded
  - package containerd.io-1.2.2-3.3.el7.x86_64 is excluded
  - package containerd.io-1.2.2-3.el7.x86_64 is excluded
  - package containerd.io-1.2.4-3.1.el7.x86_64 is excluded
  - package containerd.io-1.2.5-3.1.el7.x86_64 is excluded
  - package containerd.io-1.2.6-3.3.el7.x86_64 is excluded
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

先安装containerd.io

# yum install docker-ce
Docker CE Stable - x86_64                                                                                                                            137 kB/s |  21 kB     00:00
Red Hat Update Infrastructure 3 Client Configuration Server 8                                                                                        5.6 kB/s | 2.1 kB     00:00
Red Hat Enterprise Linux 8 for x86_64 - AppStream from RHUI (RPMs)                                                                                    18 kB/s | 2.8 kB     00:00
Red Hat Enterprise Linux 8 for x86_64 - BaseOS from RHUI (RPMs)                                                                                       16 kB/s | 2.4 kB     00:00
Error:
 Problem: package docker-ce-3:19.03.6-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed
  - cannot install the best candidate for the job
  - package containerd.io-1.2.10-3.2.el7.x86_64 is excluded
  - package containerd.io-1.2.2-3.3.el7.x86_64 is excluded
  - package containerd.io-1.2.2-3.el7.x86_64 is excluded
  - package containerd.io-1.2.4-3.1.el7.x86_64 is excluded
  - package containerd.io-1.2.5-3.1.el7.x86_64 is excluded
  - package containerd.io-1.2.6-3.3.el7.x86_64 is excluded
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[root@ip-172-31-20-189 ~]# dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
Last metadata expiration check: 0:01:22 ago on Tue 18 Feb 2020 01:07:13 AM UTC.
containerd.io-1.2.6-3.3.el7.x86_64.rpm                                                                                                                48 MB/s |  26 MB     00:00
Dependencies resolved.
=====================================================================================================================================================================================
 Package                                    Architecture         Version                                                         Repository                                     Size
=====================================================================================================================================================================================
Installing:
 containerd.io                              x86_64               1.2.6-3.3.el7                                                   @commandline                                   26 M
Installing dependencies:
 container-selinux                          noarch               2:2.94-1.git1e99f1d.module+el8.0.0+4017+bbba319f                rhui-rhel-8-appstream-rhui-rpms                43 k
 policycoreutils-python-utils               noarch               2.8-16.1.el8                                                    rhui-rhel-8-baseos-rhui-rpms                  228 k
Enabling module streams:
 container-tools                                                 rhel8

Transaction Summary
=====================================================================================================================================================================================
Install  3 Packages

Total size: 26 M
Total download size: 271 k
Installed size: 96 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): container-selinux-2.94-1.git1e99f1d.module+el8.0.0+4017+bbba319f.noarch.rpm                                                                   307 kB/s |  43 kB     00:00
(2/2): policycoreutils-python-utils-2.8-16.1.el8.noarch.rpm                                                                                          1.5 MB/s | 228 kB     00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                678 kB/s | 271 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                             1/1
  Installing       : policycoreutils-python-utils-2.8-16.1.el8.noarch                                                                                                            1/3
  Installing       : container-selinux-2:2.94-1.git1e99f1d.module+el8.0.0+4017+bbba319f.noarch                                                                                   2/3
  Running scriptlet: container-selinux-2:2.94-1.git1e99f1d.module+el8.0.0+4017+bbba319f.noarch                                                                                   2/3
  Installing       : containerd.io-1.2.6-3.3.el7.x86_64                                                                                                                          3/3
  Running scriptlet: containerd.io-1.2.6-3.3.el7.x86_64                                                                                                                          3/3
  Verifying        : container-selinux-2:2.94-1.git1e99f1d.module+el8.0.0+4017+bbba319f.noarch                                                                                   1/3
  Verifying        : policycoreutils-python-utils-2.8-16.1.el8.noarch                                                                                                            2/3
  Verifying        : containerd.io-1.2.6-3.3.el7.x86_64                                                                                                                          3/3

Installed:
  containerd.io-1.2.6-3.3.el7.x86_64        container-selinux-2:2.94-1.git1e99f1d.module+el8.0.0+4017+bbba319f.noarch        policycoreutils-python-utils-2.8-16.1.el8.noarch

Complete!

再安装docker-ce

# yum install docker-ce
Last metadata expiration check: 0:07:51 ago on Tue 18 Feb 2020 01:07:13 AM UTC.
Dependencies resolved.
=====================================================================================================================================================================================
 Package                                        Architecture                   Version                                    Repository                                            Size
=====================================================================================================================================================================================
Installing:
 docker-ce                                      x86_64                         3:19.03.6-3.el7                            docker-ce-stable                                      24 M
Installing dependencies:
 docker-ce-cli                                  x86_64                         1:19.03.6-3.el7                            docker-ce-stable                                      40 M
 libcgroup                                      x86_64                         0.41-19.el8                                rhui-rhel-8-baseos-rhui-rpms                          70 k
 libnetfilter_conntrack                         x86_64                         1.0.6-5.el8                                rhui-rhel-8-baseos-rhui-rpms                          65 k
 libnfnetlink                                   x86_64                         1.0.1-13.el8                               rhui-rhel-8-baseos-rhui-rpms                          33 k
 libnftnl                                       x86_64                         1.1.1-4.el8                                rhui-rhel-8-baseos-rhui-rpms                          83 k
 iptables                                       x86_64                         1.8.2-9.el8_0.1                            rhui-rhel-8-baseos-rhui-rpms                         582 k

Transaction Summary
=====================================================================================================================================================================================
Install  7 Packages

Total download size: 65 M
Installed size: 276 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): libcgroup-0.41-19.el8.x86_64.rpm                                                                                                              494 kB/s |  70 kB     00:00
(2/7): libnetfilter_conntrack-1.0.6-5.el8.x86_64.rpm                                                                                                 631 kB/s |  65 kB     00:00
(3/7): libnfnetlink-1.0.1-13.el8.x86_64.rpm                                                                                                          352 kB/s |  33 kB     00:00
(4/7): libnftnl-1.1.1-4.el8.x86_64.rpm                                                                                                               867 kB/s |  83 kB     00:00
(5/7): iptables-1.8.2-9.el8_0.1.x86_64.rpm                                                                                                           4.7 MB/s | 582 kB     00:00
(6/7): docker-ce-19.03.6-3.el7.x86_64.rpm                                                                                                             33 MB/s |  24 MB     00:00
(7/7): docker-ce-cli-19.03.6-3.el7.x86_64.rpm                                                                                                         39 MB/s |  40 MB     00:01
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                 61 MB/s |  65 MB     00:01
warning: /var/cache/dnf/docker-ce-stable-091d8a9c23201250/packages/docker-ce-19.03.6-3.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Docker CE Stable - x86_64                                                                                                                             37 kB/s | 1.6 kB     00:00
Importing GPG key 0x621E9F35:
 Userid     : "Docker Release (CE rpm) <docker@docker.com>"
 Fingerprint: 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35
 From       : https://download.docker.com/linux/centos/gpg
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                             1/1
  Installing       : libnfnetlink-1.0.1-13.el8.x86_64                                                                                                                            1/7
  Running scriptlet: libnfnetlink-1.0.1-13.el8.x86_64                                                                                                                            1/7
  Installing       : libnetfilter_conntrack-1.0.6-5.el8.x86_64                                                                                                                   2/7
  Running scriptlet: libnetfilter_conntrack-1.0.6-5.el8.x86_64                                                                                                                   2/7
  Installing       : libnftnl-1.1.1-4.el8.x86_64                                                                                                                                 3/7
  Running scriptlet: libnftnl-1.1.1-4.el8.x86_64                                                                                                                                 3/7
  Running scriptlet: iptables-1.8.2-9.el8_0.1.x86_64                                                                                                                             4/7
  Installing       : iptables-1.8.2-9.el8_0.1.x86_64                                                                                                                             4/7
  Running scriptlet: iptables-1.8.2-9.el8_0.1.x86_64                                                                                                                             4/7
  Running scriptlet: libcgroup-0.41-19.el8.x86_64                                                                                                                                5/7
  Installing       : libcgroup-0.41-19.el8.x86_64                                                                                                                                5/7
  Running scriptlet: libcgroup-0.41-19.el8.x86_64                                                                                                                                5/7
  Installing       : docker-ce-cli-1:19.03.6-3.el7.x86_64                                                                                                                        6/7
  Running scriptlet: docker-ce-cli-1:19.03.6-3.el7.x86_64                                                                                                                        6/7
  Installing       : docker-ce-3:19.03.6-3.el7.x86_64                                                                                                                            7/7
  Running scriptlet: docker-ce-3:19.03.6-3.el7.x86_64                                                                                                                            7/7
  Verifying        : docker-ce-3:19.03.6-3.el7.x86_64                                                                                                                            1/7
  Verifying        : docker-ce-cli-1:19.03.6-3.el7.x86_64                                                                                                                        2/7
  Verifying        : libcgroup-0.41-19.el8.x86_64                                                                                                                                3/7
  Verifying        : libnetfilter_conntrack-1.0.6-5.el8.x86_64                                                                                                                   4/7
  Verifying        : libnfnetlink-1.0.1-13.el8.x86_64                                                                                                                            5/7
  Verifying        : libnftnl-1.1.1-4.el8.x86_64                                                                                                                                 6/7
  Verifying        : iptables-1.8.2-9.el8_0.1.x86_64                                                                                                                             7/7

Installed:
  docker-ce-3:19.03.6-3.el7.x86_64  docker-ce-cli-1:19.03.6-3.el7.x86_64  libcgroup-0.41-19.el8.x86_64  libnetfilter_conntrack-1.0.6-5.el8.x86_64  libnfnetlink-1.0.1-13.el8.x86_64
  libnftnl-1.1.1-4.el8.x86_64       iptables-1.8.2-9.el8_0.1.x86_64

Complete!

打开Docker服务

# systemctl enable docker
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.
# systemctl start docker
# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-02-18 01:18:24 UTC; 5s ago
     Docs: https://docs.docker.com
 Main PID: 15974 (dockerd)
    Tasks: 8
   Memory: 57.6M
   CGroup: /system.slice/docker.service
           └─15974 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Feb 18 01:18:23 ip-172-31-20-189.ap-southeast-1.compute.internal dockerd[15974]: time="2020-02-18T01:18:23.779929616Z" level=info msg="ClientConn switching balancer to \"pick_first>
Feb 18 01:18:23 ip-172-31-20-189.ap-southeast-1.compute.internal dockerd[15974]: time="2020-02-18T01:18:23.803836421Z" level=warning msg="Your kernel does not support cgroup blkio >
Feb 18 01:18:23 ip-172-31-20-189.ap-southeast-1.compute.internal dockerd[15974]: time="2020-02-18T01:18:23.803869583Z" level=warning msg="Your kernel does not support cgroup blkio >
Feb 18 01:18:23 ip-172-31-20-189.ap-southeast-1.compute.internal dockerd[15974]: time="2020-02-18T01:18:23.803983869Z" level=info msg="Loading containers: start."
Feb 18 01:18:24 ip-172-31-20-189.ap-southeast-1.compute.internal dockerd[15974]: time="2020-02-18T01:18:24.122678848Z" level=info msg="Default bridge (docker0) is assigned with an >
Feb 18 01:18:24 ip-172-31-20-189.ap-southeast-1.compute.internal dockerd[15974]: time="2020-02-18T01:18:24.224324038Z" level=info msg="Loading containers: done."
Feb 18 01:18:24 ip-172-31-20-189.ap-southeast-1.compute.internal dockerd[15974]: time="2020-02-18T01:18:24.283833038Z" level=info msg="Docker daemon" commit=369ce74a3c graphdriver(>
Feb 18 01:18:24 ip-172-31-20-189.ap-southeast-1.compute.internal dockerd[15974]: time="2020-02-18T01:18:24.284052326Z" level=info msg="Daemon has completed initialization"
Feb 18 01:18:24 ip-172-31-20-189.ap-southeast-1.compute.internal dockerd[15974]: time="2020-02-18T01:18:24.334367595Z" level=info msg="API listen on /var/run/docker.sock"
Feb 18 01:18:24 ip-172-31-20-189.ap-southeast-1.compute.internal systemd[1]: Started Docker Application Container Engine.