阿里云安装Docker 步骤

阿里云安装Docker 步骤

step 1:安装必要的一些系统工具

sudo yum install -y yum-utils-mapper-persistent-data lvm2

step 2:添加软件源信息

sudo yum-config-mapper --add-repo http://mirrors.aliyum.com/docker-ce/linux/centos/docker-ce.repo

ps: 没有yum-config-mapper的同学请安装

yum -y install yum-utils

step 3:更新并安装Docker-CE

sudo yum makecache fast
sudo yum -y install docker-ce

step 4:开启Docker服务

sudo service docker start

完整日志:

sudo yum install -y yum-uitls device-mapper-persistent-data lvm2
Loaded plugins: fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
base                                                                         | 3.6 kB  00:00:00     
epel                                                                         | 4.7 kB  00:00:00     
extras                                                                       | 2.9 kB  00:00:00     
updates                                                                      | 2.9 kB  00:00:00     
(1/7): base/7/x86_64/group_gz                                                | 153 kB  00:00:00     
(2/7): epel/x86_64/group_gz                                                  |  95 kB  00:00:00     
(3/7): epel/x86_64/updateinfo                                                | 1.0 MB  00:00:00     
(4/7): updates/7/x86_64/primary_db                                           | 3.0 MB  00:00:00     
(5/7): base/7/x86_64/primary_db                                              | 6.1 MB  00:00:00     
(6/7): extras/7/x86_64/primary_db                                            | 194 kB  00:00:00     
(7/7): epel/x86_64/primary_db                                                | 6.8 MB  00:00:00     
Determining fastest mirrors
No package yum-uitls available.
Resolving Dependencies
--> Running transaction check
---> Package device-mapper-persistent-data.x86_64 0:0.8.5-2.el7 will be installed
--> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: device-mapper-persistent-data-0.8.5-2.el7.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: device-mapper-persistent-data-0.8.5-2.el7.x86_64
--> Processing Dependency: libaio.so.1()(64bit) for package: device-mapper-persistent-data-0.8.5-2.el7.x86_64
---> Package lvm2.x86_64 7:2.02.186-7.el7_8.2 will be installed
--> Processing Dependency: lvm2-libs = 7:2.02.186-7.el7_8.2 for package: 7:lvm2-2.02.186-7.el7_8.2.x86_64
--> Processing Dependency: liblvm2app.so.2.2(Base)(64bit) for package: 7:lvm2-2.02.186-7.el7_8.2.x86_64
--> Processing Dependency: libdevmapper.so.1.02(DM_1_02_141)(64bit) for package: 7:lvm2-2.02.186-7.el7_8.2.x86_64
--> Processing Dependency: libdevmapper.so.1.02(DM_1_02_138)(64bit) for package: 7:lvm2-2.02.186-7.el7_8.2.x86_64
--> Processing Dependency: libdevmapper-event.so.1.02(Base)(64bit) for package: 7:lvm2-2.02.186-7.el7_8.2.x86_64
--> Processing Dependency: liblvm2app.so.2.2()(64bit) for package: 7:lvm2-2.02.186-7.el7_8.2.x86_64
--> Processing Dependency: libdevmapper-event.so.1.02()(64bit) for package: 7:lvm2-2.02.186-7.el7_8.2.x86_64
--> Running transaction check
---> Package device-mapper-event-libs.x86_64 7:1.02.164-7.el7_8.2 will be installed
---> Package device-mapper-libs.x86_64 7:1.02.135-1.el7_3.5 will be updated
--> Processing Dependency: device-mapper-libs = 7:1.02.135-1.el7_3.5 for package: 7:device-mapper-1.02.135-1.el7_3.5.x86_64
---> Package device-mapper-libs.x86_64 7:1.02.164-7.el7_8.2 will be an update
---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed
---> Package lvm2-libs.x86_64 7:2.02.186-7.el7_8.2 will be installed
--> Processing Dependency: device-mapper-event = 7:1.02.164-7.el7_8.2 for package: 7:lvm2-libs-2.02.186-7.el7_8.2.x86_64
--> Running transaction check
---> Package device-mapper.x86_64 7:1.02.135-1.el7_3.5 will be updated
---> Package device-mapper.x86_64 7:1.02.164-7.el7_8.2 will be an update
---> Package device-mapper-event.x86_64 7:1.02.164-7.el7_8.2 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                             Arch         Version                       Repository     Size
====================================================================================================
Installing:
 device-mapper-persistent-data       x86_64       0.8.5-2.el7                   base          422 k
 lvm2                                x86_64       7:2.02.186-7.el7_8.2          updates       1.3 M
Installing for dependencies:
 device-mapper-event                 x86_64       7:1.02.164-7.el7_8.2          updates       191 k
 device-mapper-event-libs            x86_64       7:1.02.164-7.el7_8.2          updates       190 k
 libaio                              x86_64       0.3.109-13.el7                base           24 k
 lvm2-libs                           x86_64       7:2.02.186-7.el7_8.2          updates       1.1 M
Updating for dependencies:
 device-mapper                       x86_64       7:1.02.164-7.el7_8.2          updates       295 k
 device-mapper-libs                  x86_64       7:1.02.164-7.el7_8.2          updates       324 k

Transaction Summary
====================================================================================================
Install  2 Packages (+4 Dependent packages)
Upgrade             ( 2 Dependent packages)

Total download size: 3.8 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/8): device-mapper-event-1.02.164-7.el7_8.2.x86_64.rpm                     | 191 kB  00:00:00     
(2/8): device-mapper-event-libs-1.02.164-7.el7_8.2.x86_64.rpm                | 190 kB  00:00:00     
(3/8): device-mapper-1.02.164-7.el7_8.2.x86_64.rpm                           | 295 kB  00:00:00     
(4/8): device-mapper-libs-1.02.164-7.el7_8.2.x86_64.rpm                      | 324 kB  00:00:00     
(5/8): libaio-0.3.109-13.el7.x86_64.rpm                                      |  24 kB  00:00:00     
(6/8): device-mapper-persistent-data-0.8.5-2.el7.x86_64.rpm                  | 422 kB  00:00:00     
(7/8): lvm2-libs-2.02.186-7.el7_8.2.x86_64.rpm                               | 1.1 MB  00:00:00     
(8/8): lvm2-2.02.186-7.el7_8.2.x86_64.rpm                                    | 1.3 MB  00:00:00     
----------------------------------------------------------------------------------------------------
Total                                                               3.7 MB/s | 3.8 MB  00:00:01     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : 7:device-mapper-1.02.164-7.el7_8.2.x86_64                                       1/10 
  Updating   : 7:device-mapper-libs-1.02.164-7.el7_8.2.x86_64                                  2/10 
  Installing : 7:device-mapper-event-libs-1.02.164-7.el7_8.2.x86_64                            3/10 
  Installing : libaio-0.3.109-13.el7.x86_64                                                    4/10 
  Installing : device-mapper-persistent-data-0.8.5-2.el7.x86_64                                5/10 
  Installing : 7:device-mapper-event-1.02.164-7.el7_8.2.x86_64                                 6/10 
  Installing : 7:lvm2-libs-2.02.186-7.el7_8.2.x86_64                                           7/10 
  Installing : 7:lvm2-2.02.186-7.el7_8.2.x86_64                                                8/10 
Created symlink from /etc/systemd/system/sysinit.target.wants/lvm2-lvmpolld.socket to /usr/lib/systemd/system/lvm2-lvmpolld.socket.
  Cleanup    : 7:device-mapper-1.02.135-1.el7_3.5.x86_64                                       9/10 
  Cleanup    : 7:device-mapper-libs-1.02.135-1.el7_3.5.x86_64                                 10/10 
  Verifying  : device-mapper-persistent-data-0.8.5-2.el7.x86_64                                1/10 
  Verifying  : 7:lvm2-libs-2.02.186-7.el7_8.2.x86_64                                           2/10 
  Verifying  : 7:device-mapper-event-1.02.164-7.el7_8.2.x86_64                                 3/10 
  Verifying  : 7:lvm2-2.02.186-7.el7_8.2.x86_64                                                4/10 
  Verifying  : 7:device-mapper-libs-1.02.164-7.el7_8.2.x86_64                                  5/10 
  Verifying  : libaio-0.3.109-13.el7.x86_64                                                    6/10 
  Verifying  : 7:device-mapper-1.02.164-7.el7_8.2.x86_64                                       7/10 
  Verifying  : 7:device-mapper-event-libs-1.02.164-7.el7_8.2.x86_64                            8/10 
  Verifying  : 7:device-mapper-libs-1.02.135-1.el7_3.5.x86_64                                  9/10 
  Verifying  : 7:device-mapper-1.02.135-1.el7_3.5.x86_64                                      10/10 

Installed:
  device-mapper-persistent-data.x86_64 0:0.8.5-2.el7        lvm2.x86_64 7:2.02.186-7.el7_8.2       

Dependency Installed:
  device-mapper-event.x86_64 7:1.02.164-7.el7_8.2                                                   
  device-mapper-event-libs.x86_64 7:1.02.164-7.el7_8.2                                              
  libaio.x86_64 0:0.3.109-13.el7                                                                    
  lvm2-libs.x86_64 7:2.02.186-7.el7_8.2                                                             

Dependency Updated:
  device-mapper.x86_64 7:1.02.164-7.el7_8.2      device-mapper-libs.x86_64 7:1.02.164-7.el7_8.2     

Complete!
[root@izuf6gv46xk9pjw14u3dcfz ~]# sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo: yum-config-manager: command not found
[root@izuf6gv46xk9pjw14u3dcfz ~]# yum -y install yum-utils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package yum-utils.noarch 0:1.1.31-54.el7_8 will be installed
--> Processing Dependency: python-kitchen for package: yum-utils-1.1.31-54.el7_8.noarch
--> Processing Dependency: libxml2-python for package: yum-utils-1.1.31-54.el7_8.noarch
--> Running transaction check
---> Package libxml2-python.x86_64 0:2.9.1-6.el7.4 will be installed
--> Processing Dependency: libxml2 = 2.9.1-6.el7.4 for package: libxml2-python-2.9.1-6.el7.4.x86_64
---> Package python-kitchen.noarch 0:1.1.1-5.el7 will be installed
--> Processing Dependency: python-chardet for package: python-kitchen-1.1.1-5.el7.noarch
--> Running transaction check
---> Package libxml2.x86_64 0:2.9.1-6.el7_2.3 will be updated
---> Package libxml2.x86_64 0:2.9.1-6.el7.4 will be an update
---> Package python-chardet.noarch 0:2.2.1-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                   Arch              Version                       Repository          Size
====================================================================================================
Installing:
 yum-utils                 noarch            1.1.31-54.el7_8               updates            122 k
Installing for dependencies:
 libxml2-python            x86_64            2.9.1-6.el7.4                 base               247 k
 python-chardet            noarch            2.2.1-3.el7                   base               227 k
 python-kitchen            noarch            1.1.1-5.el7                   base               267 k
Updating for dependencies:
 libxml2                   x86_64            2.9.1-6.el7.4                 base               668 k

Transaction Summary
====================================================================================================
Install  1 Package  (+3 Dependent packages)
Upgrade             ( 1 Dependent package)

Total download size: 1.5 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/5): libxml2-python-2.9.1-6.el7.4.x86_64.rpm                               | 247 kB  00:00:00     
(2/5): libxml2-2.9.1-6.el7.4.x86_64.rpm                                      | 668 kB  00:00:00     
(3/5): python-kitchen-1.1.1-5.el7.noarch.rpm                                 | 267 kB  00:00:00     
(4/5): python-chardet-2.2.1-3.el7.noarch.rpm                                 | 227 kB  00:00:00     
(5/5): yum-utils-1.1.31-54.el7_8.noarch.rpm                                  | 122 kB  00:00:00     
----------------------------------------------------------------------------------------------------
Total                                                               6.5 MB/s | 1.5 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : libxml2-2.9.1-6.el7.4.x86_64                                                     1/6 
  Installing : libxml2-python-2.9.1-6.el7.4.x86_64                                              2/6 
  Installing : python-chardet-2.2.1-3.el7.noarch                                                3/6 
  Installing : python-kitchen-1.1.1-5.el7.noarch                                                4/6 
  Installing : yum-utils-1.1.31-54.el7_8.noarch                                                 5/6 
  Cleanup    : libxml2-2.9.1-6.el7_2.3.x86_64                                                   6/6 
  Verifying  : python-chardet-2.2.1-3.el7.noarch                                                1/6 
  Verifying  : python-kitchen-1.1.1-5.el7.noarch                                                2/6 
  Verifying  : libxml2-python-2.9.1-6.el7.4.x86_64                                              3/6 
  Verifying  : libxml2-2.9.1-6.el7.4.x86_64                                                     4/6 
  Verifying  : yum-utils-1.1.31-54.el7_8.noarch                                                 5/6 
  Verifying  : libxml2-2.9.1-6.el7_2.3.x86_64                                                   6/6 

Installed:
  yum-utils.noarch 0:1.1.31-54.el7_8                                                                

Dependency Installed:
  libxml2-python.x86_64 0:2.9.1-6.el7.4             python-chardet.noarch 0:2.2.1-3.el7            
  python-kitchen.noarch 0:1.1.1-5.el7              

Dependency Updated:
  libxml2.x86_64 0:2.9.1-6.el7.4                                                                    

Complete!
[root@izuf6gv46xk9pjw14u3dcfz ~]# sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
Loaded plugins: fastestmirror
adding repo from: http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
grabbing file http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
[root@izuf6gv46xk9pjw14u3dcfz ~]# sudo yum makecache fast
Loaded plugins: fastestmirror
base                                                                         | 3.6 kB  00:00:00     
docker-ce-stable                                                             | 3.5 kB  00:00:00     
epel                                                                         | 4.7 kB  00:00:00     
extras                                                                       | 2.9 kB  00:00:00     
updates                                                                      | 2.9 kB  00:00:00     
(1/2): docker-ce-stable/x86_64/updateinfo                                    |   55 B  00:00:00     
(2/2): docker-ce-stable/x86_64/primary_db                                    |  45 kB  00:00:00     
Loading mirror speeds from cached hostfile
Metadata Cache Created
[root@izuf6gv46xk9pjw14u3dcfz ~]# sudo yum -y install docker-ce
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 3:19.03.12-3.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-19.03.12-3.el7.x86_64
--> Processing Dependency: containerd.io >= 1.2.2-3 for package: 3:docker-ce-19.03.12-3.el7.x86_64
--> Processing Dependency: libseccomp >= 2.3 for package: 3:docker-ce-19.03.12-3.el7.x86_64
--> Processing Dependency: docker-ce-cli for package: 3:docker-ce-19.03.12-3.el7.x86_64
--> Processing Dependency: libcgroup for package: 3:docker-ce-19.03.12-3.el7.x86_64
--> Processing Dependency: libseccomp.so.2()(64bit) for package: 3:docker-ce-19.03.12-3.el7.x86_64
--> Running transaction check
---> Package container-selinux.noarch 2:2.119.1-1.c57a6f9.el7 will be installed
--> Processing Dependency: selinux-policy-targeted >= 3.13.1-216.el7 for package: 2:container-selinux-2.119.1-1.c57a6f9.el7.noarch
--> Processing Dependency: selinux-policy-base >= 3.13.1-216.el7 for package: 2:container-selinux-2.119.1-1.c57a6f9.el7.noarch
--> Processing Dependency: selinux-policy >= 3.13.1-216.el7 for package: 2:container-selinux-2.119.1-1.c57a6f9.el7.noarch
--> Processing Dependency: policycoreutils-python for package: 2:container-selinux-2.119.1-1.c57a6f9.el7.noarch
---> Package containerd.io.x86_64 0:1.2.13-3.2.el7 will be installed
---> Package docker-ce-cli.x86_64 1:19.03.12-3.el7 will be installed
---> Package libcgroup.x86_64 0:0.41-21.el7 will be installed
---> Package libseccomp.x86_64 0:2.3.1-4.el7 will be installed
--> Running transaction check
---> Package policycoreutils-python.x86_64 0:2.5-34.el7 will be installed
--> Processing Dependency: policycoreutils = 2.5-34.el7 for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: setools-libs >= 3.3.8-4 for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libsemanage-python >= 2.5-14 for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: python-IPy for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
---> Package selinux-policy.noarch 0:3.13.1-102.el7_3.16 will be updated
---> Package selinux-policy.noarch 0:3.13.1-266.el7_8.1 will be an update
--> Processing Dependency: libsemanage >= 2.5-13 for package: selinux-policy-3.13.1-266.el7_8.1.noarch
---> Package selinux-policy-targeted.noarch 0:3.13.1-102.el7_3.16 will be updated
---> Package selinux-policy-targeted.noarch 0:3.13.1-266.el7_8.1 will be an update
--> Running transaction check
---> Package audit-libs-python.x86_64 0:2.8.5-4.el7 will be installed
--> Processing Dependency: audit-libs(x86-64) = 2.8.5-4.el7 for package: audit-libs-python-2.8.5-4.el7.x86_64
---> Package checkpolicy.x86_64 0:2.5-8.el7 will be installed
---> Package libsemanage.x86_64 0:2.5-5.1.el7_3 will be updated
---> Package libsemanage.x86_64 0:2.5-14.el7 will be an update
--> Processing Dependency: libsepol >= 2.5-10 for package: libsemanage-2.5-14.el7.x86_64
--> Processing Dependency: libselinux >= 2.5-14 for package: libsemanage-2.5-14.el7.x86_64
---> Package libsemanage-python.x86_64 0:2.5-14.el7 will be installed
---> Package policycoreutils.x86_64 0:2.5-11.el7_3 will be updated
---> Package policycoreutils.x86_64 0:2.5-34.el7 will be an update
--> Processing Dependency: libselinux-utils >= 2.5-14 for package: policycoreutils-2.5-34.el7.x86_64
---> Package python-IPy.noarch 0:0.75-6.el7 will be installed
---> Package setools-libs.x86_64 0:3.3.8-4.el7 will be installed
--> Running transaction check
---> Package audit-libs.x86_64 0:2.6.5-3.el7_3.1 will be updated
--> Processing Dependency: audit-libs(x86-64) = 2.6.5-3.el7_3.1 for package: audit-2.6.5-3.el7_3.1.x86_64
---> Package audit-libs.x86_64 0:2.8.5-4.el7 will be an update
---> Package libselinux.x86_64 0:2.5-6.el7 will be updated
--> Processing Dependency: libselinux(x86-64) = 2.5-6.el7 for package: libselinux-python-2.5-6.el7.x86_64
---> Package libselinux.x86_64 0:2.5-15.el7 will be an update
---> Package libselinux-utils.x86_64 0:2.5-6.el7 will be updated
---> Package libselinux-utils.x86_64 0:2.5-15.el7 will be an update
---> Package libsepol.x86_64 0:2.5-6.el7 will be updated
---> Package libsepol.x86_64 0:2.5-10.el7 will be an update
--> Running transaction check
---> Package audit.x86_64 0:2.6.5-3.el7_3.1 will be updated
---> Package audit.x86_64 0:2.8.5-4.el7 will be an update
---> Package libselinux-python.x86_64 0:2.5-6.el7 will be updated
---> Package libselinux-python.x86_64 0:2.5-15.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                      Arch        Version                       Repository             Size
====================================================================================================
Installing:
 docker-ce                    x86_64      3:19.03.12-3.el7              docker-ce-stable       24 M
Installing for dependencies:
 audit-libs-python            x86_64      2.8.5-4.el7                   base                   76 k
 checkpolicy                  x86_64      2.5-8.el7                     base                  295 k
 container-selinux            noarch      2:2.119.1-1.c57a6f9.el7       extras                 40 k
 containerd.io                x86_64      1.2.13-3.2.el7                docker-ce-stable       25 M
 docker-ce-cli                x86_64      1:19.03.12-3.el7              docker-ce-stable       38 M
 libcgroup                    x86_64      0.41-21.el7                   base                   66 k
 libseccomp                   x86_64      2.3.1-4.el7                   base                   56 k
 libsemanage-python           x86_64      2.5-14.el7                    base                  113 k
 policycoreutils-python       x86_64      2.5-34.el7                    base                  457 k
 python-IPy                   noarch      0.75-6.el7                    base                   32 k
 setools-libs                 x86_64      3.3.8-4.el7                   base                  620 k
Updating for dependencies:
 audit                        x86_64      2.8.5-4.el7                   base                  256 k
 audit-libs                   x86_64      2.8.5-4.el7                   base                  102 k
 libselinux                   x86_64      2.5-15.el7                    base                  162 k
 libselinux-python            x86_64      2.5-15.el7                    base                  236 k
 libselinux-utils             x86_64      2.5-15.el7                    base                  151 k
 libsemanage                  x86_64      2.5-14.el7                    base                  151 k
 libsepol                     x86_64      2.5-10.el7                    base                  297 k
 policycoreutils              x86_64      2.5-34.el7                    base                  917 k
 selinux-policy               noarch      3.13.1-266.el7_8.1            updates               497 k
 selinux-policy-targeted      noarch      3.13.1-266.el7_8.1            updates               7.0 M

Transaction Summary
====================================================================================================
Install  1 Package  (+11 Dependent packages)
Upgrade             ( 10 Dependent packages)

Total download size: 99 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/22): audit-libs-2.8.5-4.el7.x86_64.rpm                                    | 102 kB  00:00:00     
(2/22): audit-libs-python-2.8.5-4.el7.x86_64.rpm                             |  76 kB  00:00:00     
(3/22): audit-2.8.5-4.el7.x86_64.rpm                                         | 256 kB  00:00:00     
(4/22): checkpolicy-2.5-8.el7.x86_64.rpm                                     | 295 kB  00:00:00     
(5/22): container-selinux-2.119.1-1.c57a6f9.el7.noarch.rpm                   |  40 kB  00:00:00     
warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/docker-ce-19.03.12-3.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Public key for docker-ce-19.03.12-3.el7.x86_64.rpm is not installed
(6/22): docker-ce-19.03.12-3.el7.x86_64.rpm                                  |  24 MB  00:00:01     
(7/22): containerd.io-1.2.13-3.2.el7.x86_64.rpm                              |  25 MB  00:00:01     
(8/22): libcgroup-0.41-21.el7.x86_64.rpm                                     |  66 kB  00:00:00     
(9/22): libselinux-2.5-15.el7.x86_64.rpm                                     | 162 kB  00:00:00     
(10/22): libselinux-python-2.5-15.el7.x86_64.rpm                             | 236 kB  00:00:00     
(11/22): libselinux-utils-2.5-15.el7.x86_64.rpm                              | 151 kB  00:00:00     
(12/22): libsemanage-2.5-14.el7.x86_64.rpm                                   | 151 kB  00:00:00     
(13/22): libsemanage-python-2.5-14.el7.x86_64.rpm                            | 113 kB  00:00:00     
(14/22): libsepol-2.5-10.el7.x86_64.rpm                                      | 297 kB  00:00:00     
(15/22): libseccomp-2.3.1-4.el7.x86_64.rpm                                   |  56 kB  00:00:00     
(16/22): policycoreutils-2.5-34.el7.x86_64.rpm                               | 917 kB  00:00:00     
(17/22): python-IPy-0.75-6.el7.noarch.rpm                                    |  32 kB  00:00:00     
(18/22): policycoreutils-python-2.5-34.el7.x86_64.rpm                        | 457 kB  00:00:00     
(19/22): selinux-policy-targeted-3.13.1-266.el7_8.1.noarch.rpm               | 7.0 MB  00:00:00     
(20/22): selinux-policy-3.13.1-266.el7_8.1.noarch.rpm                        | 497 kB  00:00:00     
(21/22): setools-libs-3.3.8-4.el7.x86_64.rpm                                 | 620 kB  00:00:00     
(22/22): docker-ce-cli-19.03.12-3.el7.x86_64.rpm                             |  38 MB  00:00:03     
----------------------------------------------------------------------------------------------------
Total                                                                20 MB/s |  99 MB  00:00:04     
Retrieving key from https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
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://mirrors.aliyun.com/docker-ce/linux/centos/gpg
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : libsepol-2.5-10.el7.x86_64                                                      1/32 
  Updating   : libselinux-2.5-15.el7.x86_64                                                    2/32 
  Updating   : audit-libs-2.8.5-4.el7.x86_64                                                   3/32 
  Updating   : libsemanage-2.5-14.el7.x86_64                                                   4/32 
  Updating   : libselinux-utils-2.5-15.el7.x86_64                                              5/32 
  Updating   : policycoreutils-2.5-34.el7.x86_64                                               6/32 
  Updating   : selinux-policy-3.13.1-266.el7_8.1.noarch                                        7/32 
  Installing : libcgroup-0.41-21.el7.x86_64                                                    8/32 
  Installing : libseccomp-2.3.1-4.el7.x86_64                                                   9/32 
  Updating   : selinux-policy-targeted-3.13.1-266.el7_8.1.noarch                              10/32 
  Installing : libsemanage-python-2.5-14.el7.x86_64                                           11/32 
  Installing : audit-libs-python-2.8.5-4.el7.x86_64                                           12/32 
  Installing : setools-libs-3.3.8-4.el7.x86_64                                                13/32 
  Updating   : libselinux-python-2.5-15.el7.x86_64                                            14/32 
  Installing : 1:docker-ce-cli-19.03.12-3.el7.x86_64                                          15/32 
  Installing : python-IPy-0.75-6.el7.noarch                                                   16/32 
  Installing : checkpolicy-2.5-8.el7.x86_64                                                   17/32 
  Installing : policycoreutils-python-2.5-34.el7.x86_64                                       18/32 
  Installing : 2:container-selinux-2.119.1-1.c57a6f9.el7.noarch                               19/32 
setsebool:  SELinux is disabled.
  Installing : containerd.io-1.2.13-3.2.el7.x86_64                                            20/32 
  Installing : 3:docker-ce-19.03.12-3.el7.x86_64                                              21/32 
  Updating   : audit-2.8.5-4.el7.x86_64                                                       22/32 
  Cleanup    : selinux-policy-targeted-3.13.1-102.el7_3.16.noarch                             23/32 
  Cleanup    : selinux-policy-3.13.1-102.el7_3.16.noarch                                      24/32 
  Cleanup    : policycoreutils-2.5-11.el7_3.x86_64                                            25/32 
  Cleanup    : libsemanage-2.5-5.1.el7_3.x86_64                                               26/32 
  Cleanup    : libselinux-utils-2.5-6.el7.x86_64                                              27/32 
  Cleanup    : libselinux-python-2.5-6.el7.x86_64                                             28/32 
  Cleanup    : libselinux-2.5-6.el7.x86_64                                                    29/32 
  Cleanup    : audit-2.6.5-3.el7_3.1.x86_64                                                   30/32 
  Cleanup    : audit-libs-2.6.5-3.el7_3.1.x86_64                                              31/32 
  Cleanup    : libsepol-2.5-6.el7.x86_64                                                      32/32 
  Verifying  : 2:container-selinux-2.119.1-1.c57a6f9.el7.noarch                                1/32 
  Verifying  : containerd.io-1.2.13-3.2.el7.x86_64                                             2/32 
  Verifying  : audit-libs-2.8.5-4.el7.x86_64                                                   3/32 
  Verifying  : checkpolicy-2.5-8.el7.x86_64                                                    4/32 
  Verifying  : policycoreutils-2.5-34.el7.x86_64                                               5/32 
  Verifying  : selinux-policy-3.13.1-266.el7_8.1.noarch                                        6/32 
  Verifying  : python-IPy-0.75-6.el7.noarch                                                    7/32 
  Verifying  : libseccomp-2.3.1-4.el7.x86_64                                                   8/32 
  Verifying  : libselinux-utils-2.5-15.el7.x86_64                                              9/32 
  Verifying  : policycoreutils-python-2.5-34.el7.x86_64                                       10/32 
  Verifying  : 3:docker-ce-19.03.12-3.el7.x86_64                                              11/32 
  Verifying  : setools-libs-3.3.8-4.el7.x86_64                                                12/32 
  Verifying  : audit-2.8.5-4.el7.x86_64                                                       13/32 
  Verifying  : libsemanage-python-2.5-14.el7.x86_64                                           14/32 
  Verifying  : libsemanage-2.5-14.el7.x86_64                                                  15/32 
  Verifying  : libselinux-python-2.5-15.el7.x86_64                                            16/32 
  Verifying  : libsepol-2.5-10.el7.x86_64                                                     17/32 
  Verifying  : audit-libs-python-2.8.5-4.el7.x86_64                                           18/32 
  Verifying  : libselinux-2.5-15.el7.x86_64                                                   19/32 
  Verifying  : selinux-policy-targeted-3.13.1-266.el7_8.1.noarch                              20/32 
  Verifying  : 1:docker-ce-cli-19.03.12-3.el7.x86_64                                          21/32 
  Verifying  : libcgroup-0.41-21.el7.x86_64                                                   22/32 
  Verifying  : selinux-policy-3.13.1-102.el7_3.16.noarch                                      23/32 
  Verifying  : libselinux-python-2.5-6.el7.x86_64                                             24/32 
  Verifying  : libselinux-utils-2.5-6.el7.x86_64                                              25/32 
  Verifying  : policycoreutils-2.5-11.el7_3.x86_64                                            26/32 
  Verifying  : audit-2.6.5-3.el7_3.1.x86_64                                                   27/32 
  Verifying  : libsepol-2.5-6.el7.x86_64                                                      28/32 
  Verifying  : selinux-policy-targeted-3.13.1-102.el7_3.16.noarch                             29/32 
  Verifying  : libsemanage-2.5-5.1.el7_3.x86_64                                               30/32 
  Verifying  : libselinux-2.5-6.el7.x86_64                                                    31/32 
  Verifying  : audit-libs-2.6.5-3.el7_3.1.x86_64                                              32/32 

Installed:
  docker-ce.x86_64 3:19.03.12-3.el7                                                                 

Dependency Installed:
  audit-libs-python.x86_64 0:2.8.5-4.el7                checkpolicy.x86_64 0:2.5-8.el7             
  container-selinux.noarch 2:2.119.1-1.c57a6f9.el7      containerd.io.x86_64 0:1.2.13-3.2.el7      
  docker-ce-cli.x86_64 1:19.03.12-3.el7                 libcgroup.x86_64 0:0.41-21.el7             
  libseccomp.x86_64 0:2.3.1-4.el7                       libsemanage-python.x86_64 0:2.5-14.el7     
  policycoreutils-python.x86_64 0:2.5-34.el7            python-IPy.noarch 0:0.75-6.el7             
  setools-libs.x86_64 0:3.3.8-4.el7                    

Dependency Updated:
  audit.x86_64 0:2.8.5-4.el7                   audit-libs.x86_64 0:2.8.5-4.el7                      
  libselinux.x86_64 0:2.5-15.el7               libselinux-python.x86_64 0:2.5-15.el7                
  libselinux-utils.x86_64 0:2.5-15.el7         libsemanage.x86_64 0:2.5-14.el7                      
  libsepol.x86_64 0:2.5-10.el7                 policycoreutils.x86_64 0:2.5-34.el7                  
  selinux-policy.noarch 0:3.13.1-266.el7_8.1   selinux-policy-targeted.noarch 0:3.13.1-266.el7_8.1  

Complete!
[root@izuf6gv46xk9pjw14u3dcfz ~]# sudo service docker start
Redirecting to /bin/systemctl start  docker.service

step 5:查看Docker 版本号

docker version
[root@izuf6gv46xk9pjw14u3dcfz ~]# docker version
Client: Docker Engine - Community
 Version:           19.03.12
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        48a66213fe
 Built:             Mon Jun 22 15:46:54 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.12
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.10
  Git commit:       48a66213fe
  Built:            Mon Jun 22 15:45:28 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

搞定!

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值