Centos7下安装Docker(使用 yum 进行安装)
Centos7下安装Docker(不会写脚本,使用 yum 进行安装)
# step 1: 安装必要的一些系统工具
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
# step 2: 添加软件yum源信息
阿里源 sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo 或者清华源 sudo yum-config-manager --add-repo https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo
# step 3: 更新并安装Docker-CE
sudo yum makecache fast
# step 4 : 生成缓存
#在更新yum源或者出现配置yum源之后,通常都会使用yum makecache 生成缓存
sudo yum -y install docker-ce
# step 5 : 开启Docker服务并检查版本信息
#sudo service docker start
#docker info
以下是详细安装步骤:
1 [root@7 ~]# sudo yum install -y yum-utils device-mapper-persistent-data lvm2 2 Loaded plugins: fastestmirror 3 Loading mirror speeds from cached hostfile 4 * base: mirrors.ustc.edu.cn 5 * extras: mirrors.163.com 6 * updates: mirrors.ustc.edu.cn 7 Resolving Dependencies 8 --> Running transaction check 9 ---> Package device-mapper-persistent-data.x86_64 0:0.8.5-3.el7 will be updated 10 ---> Package device-mapper-persistent-data.x86_64 0:0.8.5-3.el7_9.2 will be an update 11 ---> Package lvm2.x86_64 7:2.02.187-6.el7 will be updated 12 ---> Package lvm2.x86_64 7:2.02.187-6.el7_9.3 will be an update 13 --> Processing Dependency: lvm2-libs = 7:2.02.187-6.el7_9.3 for package: 7:lvm2-2.02.187-6.el7_9.3.x86_64 14 ---> Package yum-utils.noarch 0:1.1.31-54.el7_8 will be installed 15 --> Processing Dependency: python-kitchen for package: yum-utils-1.1.31-54.el7_8.noarch 16 --> Processing Dependency: libxml2-python for package: yum-utils-1.1.31-54.el7_8.noarch 17 --> Running transaction check 18 ---> Package libxml2-python.x86_64 0:2.9.1-6.el7.5 will be installed 19 ---> Package lvm2-libs.x86_64 7:2.02.187-6.el7 will be updated 20 ---> Package lvm2-libs.x86_64 7:2.02.187-6.el7_9.3 will be an update 21 --> Processing Dependency: device-mapper-event = 7:1.02.170-6.el7_9.3 for package: 7:lvm2-libs-2.02.187-6.el7_9.3.x86_64 22 ---> Package python-kitchen.noarch 0:1.1.1-5.el7 will be installed 23 --> Processing Dependency: python-chardet for package: python-kitchen-1.1.1-5.el7.noarch 24 --> Running transaction check 25 ---> Package device-mapper-event.x86_64 7:1.02.170-6.el7 will be updated 26 ---> Package device-mapper-event.x86_64 7:1.02.170-6.el7_9.3 will be an update 27 --> Processing Dependency: device-mapper-event-libs = 7:1.02.170-6.el7_9.3 for package: 7:device-mapper-event-1.02.170-6.el7_9.3.x86_64 28 --> Processing Dependency: device-mapper = 7:1.02.170-6.el7_9.3 for package: 7:device-mapper-event-1.02.170-6.el7_9.3.x86_64 29 ---> Package python-chardet.noarch 0:2.2.1-3.el7 will be installed 30 --> Running transaction check 31 ---> Package device-mapper.x86_64 7:1.02.170-6.el7 will be updated 32 --> Processing Dependency: device-mapper = 7:1.02.170-6.el7 for package: 7:device-mapper-libs-1.02.170-6.el7.x86_64 33 ---> Package device-mapper.x86_64 7:1.02.170-6.el7_9.3 will be an update 34 ---> Package device-mapper-event-libs.x86_64 7:1.02.170-6.el7 will be updated 35 ---> Package device-mapper-event-libs.x86_64 7:1.02.170-6.el7_9.3 will be an update 36 --> Running transaction check 37 ---> Package device-mapper-libs.x86_64 7:1.02.170-6.el7 will be updated 38 ---> Package device-mapper-libs.x86_64 7:1.02.170-6.el7_9.3 will be an update 39 --> Finished Dependency Resolution 40 41 Dependencies Resolved 42 43 ======================================================================================= 44 Package Arch Version Repository Size 45 ======================================================================================= 46 Installing: 47 yum-utils noarch 1.1.31-54.el7_8 base 122 k 48 Updating: 49 device-mapper-persistent-data x86_64 0.8.5-3.el7_9.2 updates 423 k 50 lvm2 x86_64 7:2.02.187-6.el7_9.3 updates 1.3 M 51 Installing for dependencies: 52 libxml2-python x86_64 2.9.1-6.el7.5 base 247 k 53 python-chardet noarch 2.2.1-3.el7 base 227 k 54 python-kitchen noarch 1.1.1-5.el7 base 267 k 55 Updating for dependencies: 56 device-mapper x86_64 7:1.02.170-6.el7_9.3 updates 297 k 57 device-mapper-event x86_64 7:1.02.170-6.el7_9.3 updates 192 k 58 device-mapper-event-libs x86_64 7:1.02.170-6.el7_9.3 updates 191 k 59 device-mapper-libs x86_64 7:1.02.170-6.el7_9.3 updates 325 k 60 lvm2-libs x86_64 7:2.02.187-6.el7_9.3 updates 1.1 M 61 62 Transaction Summary 63 ======================================================================================= 64 Install 1 Package (+3 Dependent packages) 65 Upgrade 2 Packages (+5 Dependent packages) 66 67 Total download size: 4.7 M 68 Downloading packages: 69 Delta RPMs disabled because /usr/bin/applydeltarpm not installed. 70 (1/11): device-mapper-1.02.170-6.el7_9.3.x86_64.rpm | 297 kB 00:00:00 71 (2/11): device-mapper-event-1.02.170-6.el7_9.3.x86_64.rpm | 192 kB 00:00:00 72 (3/11): lvm2-2.02.187-6.el7_9.3.x86_64.rpm | 1.3 MB 00:00:02 73 (4/11): lvm2-libs-2.02.187-6.el7_9.3.x86_64.rpm | 1.1 MB 00:00:02 74 (5/11): python-chardet-2.2.1-3.el7.noarch.rpm | 227 kB 00:00:00 75 (6/11): device-mapper-event-libs-1.02.170-6.el7_9.3.x86_64.rpm | 191 kB 00:00:05 76 (7/11): python-kitchen-1.1.1-5.el7.noarch.rpm | 267 kB 00:00:00 77 (8/11): yum-utils-1.1.31-54.el7_8.noarch.rpm | 122 kB 00:00:00 78 (9/11): libxml2-python-2.9.1-6.el7.5.x86_64.rpm | 247 kB 00:00:06 79 (10/11): device-mapper-libs-1.02.170-6.el7_9.3.x86_64.rpm | 325 kB 00:00:08 80 (11/11): device-mapper-persistent-data-0.8.5-3.el7_9.2.x86_64.r | 423 kB 00:00:08 81 --------------------------------------------------------------------------------------- 82 Total 524 kB/s | 4.7 MB 00:09 83 Running transaction check 84 Running transaction test 85 Transaction test succeeded 86 Running transaction 87 Updating : 7:device-mapper-1.02.170-6.el7_9.3.x86_64 1/18 88 Updating : 7:device-mapper-libs-1.02.170-6.el7_9.3.x86_64 2/18 89 Updating : 7:device-mapper-event-libs-1.02.170-6.el7_9.3.x86_64 3/18 90 Updating : 7:device-mapper-event-1.02.170-6.el7_9.3.x86_64 4/18 91 Updating : 7:lvm2-libs-2.02.187-6.el7_9.3.x86_64 5/18 92 Installing : python-chardet-2.2.1-3.el7.noarch 6/18 93 Installing : python-kitchen-1.1.1-5.el7.noarch 7/18 94 Updating : device-mapper-persistent-data-0.8.5-3.el7_9.2.x86_64 8/18 95 Installing : libxml2-python-2.9.1-6.el7.5.x86_64 9/18 96 Installing : yum-utils-1.1.31-54.el7_8.noarch 10/18 97 Updating : 7:lvm2-2.02.187-6.el7_9.3.x86_64 11/18 98 Cleanup : 7:lvm2-2.02.187-6.el7.x86_64 12/18 99 Cleanup : 7:lvm2-libs-2.02.187-6.el7.x86_64 13/18 100 Cleanup : 7:device-mapper-event-1.02.170-6.el7.x86_64 14/18 101 Cleanup : 7:device-mapper-event-libs-1.02.170-6.el7.x86_64 15/18 102 Cleanup : 7:device-mapper-1.02.170-6.el7.x86_64 16/18 103 Cleanup : 7:device-mapper-libs-1.02.170-6.el7.x86_64 17/18 104 Cleanup : device-mapper-persistent-data-0.8.5-3.el7.x86_64 18/18 105 Verifying : libxml2-python-2.9.1-6.el7.5.x86_64 1/18 106 Verifying : 7:lvm2-2.02.187-6.el7_9.3.x86_64 2/18 107 Verifying : device-mapper-persistent-data-0.8.5-3.el7_9.2.x86_64 3/18 108 Verifying : 7:device-mapper-event-1.02.170-6.el7_9.3.x86_64 4/18 109 Verifying : 7:device-mapper-libs-1.02.170-6.el7_9.3.x86_64 5/18 110 Verifying : python-kitchen-1.1.1-5.el7.noarch 6/18 111 Verifying : 7:lvm2-libs-2.02.187-6.el7_9.3.x86_64 7/18 112 Verifying : 7:device-mapper-event-libs-1.02.170-6.el7_9.3.x86_64 8/18 113 Verifying : 7:device-mapper-1.02.170-6.el7_9.3.x86_64 9/18 114 Verifying : yum-utils-1.1.31-54.el7_8.noarch 10/18 115 Verifying : python-chardet-2.2.1-3.el7.noarch 11/18 116 Verifying : 7:device-mapper-event-libs-1.02.170-6.el7.x86_64 12/18 117 Verifying : 7:lvm2-libs-2.02.187-6.el7.x86_64 13/18 118 Verifying : 7:device-mapper-libs-1.02.170-6.el7.x86_64 14/18 119 Verifying : 7:lvm2-2.02.187-6.el7.x86_64 15/18 120 Verifying : device-mapper-persistent-data-0.8.5-3.el7.x86_64 16/18 121 Verifying : 7:device-mapper-1.02.170-6.el7.x86_64 17/18 122 Verifying : 7:device-mapper-event-1.02.170-6.el7.x86_64 18/18 123 124 Installed: 125 yum-utils.noarch 0:1.1.31-54.el7_8 126 127 Dependency Installed: 128 libxml2-python.x86_64 0:2.9.1-6.el7.5 python-chardet.noarch 0:2.2.1-3.el7 129 python-kitchen.noarch 0:1.1.1-5.el7 130 131 Updated: 132 device-mapper-persistent-data.x86_64 0:0.8.5-3.el7_9.2 133 lvm2.x86_64 7:2.02.187-6.el7_9.3 134 135 Dependency Updated: 136 device-mapper.x86_64 7:1.02.170-6.el7_9.3 137 device-mapper-event.x86_64 7:1.02.170-6.el7_9.3 138 device-mapper-event-libs.x86_64 7:1.02.170-6.el7_9.3 139 device-mapper-libs.x86_64 7:1.02.170-6.el7_9.3 140 lvm2-libs.x86_64 7:2.02.187-6.el7_9.3 141 142 Complete! 143 [root@7 ~]# sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo 144 Loaded plugins: fastestmirror 145 adding repo from: https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo 146 grabbing file https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo 147 repo saved to /etc/yum.repos.d/docker-ce.repo 148 [root@7 ~]# sudo yum makecache fast 149 Loaded plugins: fastestmirror 150 Loading mirror speeds from cached hostfile 151 * base: mirrors.ustc.edu.cn 152 * extras: mirrors.163.com 153 * updates: mirrors.ustc.edu.cn 154 base | 3.6 kB 00:00:00 155 docker-ce-stable | 3.5 kB 00:00:00 156 extras | 2.9 kB 00:00:00 157 updates | 2.9 kB 00:00:00 158 (1/2): docker-ce-stable/x86_64/updateinfo | 55 B 00:00:00 159 (2/2): docker-ce-stable/x86_64/primary_db | 52 kB 00:00:00 160 Metadata Cache Created 161 [root@7 ~]# sudo yum -y install docker-ce 162 Loaded plugins: fastestmirror 163 Loading mirror speeds from cached hostfile 164 * base: mirrors.ustc.edu.cn 165 * extras: mirrors.163.com 166 * updates: mirrors.ustc.edu.cn 167 Resolving Dependencies 168 --> Running transaction check 169 ---> Package docker-ce.x86_64 3:20.10.2-3.el7 will be installed 170 --> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-20.10.2-3.el7.x86_64 171 --> Processing Dependency: containerd.io >= 1.4.1 for package: 3:docker-ce-20.10.2-3.el7.x86_64 172 --> Processing Dependency: libseccomp >= 2.3 for package: 3:docker-ce-20.10.2-3.el7.x86_64 173 --> Processing Dependency: docker-ce-cli for package: 3:docker-ce-20.10.2-3.el7.x86_64 174 --> Processing Dependency: docker-ce-rootless-extras for package: 3:docker-ce-20.10.2-3.el7.x86_64 175 --> Processing Dependency: libcgroup for package: 3:docker-ce-20.10.2-3.el7.x86_64 176 --> Running transaction check 177 ---> Package container-selinux.noarch 2:2.119.2-1.911c772.el7_8 will be installed 178 --> Processing Dependency: policycoreutils-python for package: 2:container-selinux-2.119.2-1.911c772.el7_8.noarch 179 ---> Package containerd.io.x86_64 0:1.4.3-3.1.el7 will be installed 180 ---> Package docker-ce-cli.x86_64 1:20.10.2-3.el7 will be installed 181 ---> Package docker-ce-rootless-extras.x86_64 0:20.10.2-3.el7 will be installed 182 --> Processing Dependency: fuse-overlayfs >= 0.7 for package: docker-ce-rootless-extras-20.10.2-3.el7.x86_64 183 --> Processing Dependency: slirp4netns >= 0.4 for package: docker-ce-rootless-extras-20.10.2-3.el7.x86_64 184 ---> Package libcgroup.x86_64 0:0.41-21.el7 will be installed 185 ---> Package libseccomp.x86_64 0:2.3.1-4.el7 will be installed 186 --> Running transaction check 187 ---> Package fuse-overlayfs.x86_64 0:0.7.2-6.el7_8 will be installed 188 --> Processing Dependency: libfuse3.so.3(FUSE_3.2)(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64 189 --> Processing Dependency: libfuse3.so.3(FUSE_3.0)(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64 190 --> Processing Dependency: libfuse3.so.3()(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64 191 ---> Package policycoreutils-python.x86_64 0:2.5-34.el7 will be installed 192 --> Processing Dependency: setools-libs >= 3.3.8-4 for package: policycoreutils-python-2.5-34.el7.x86_64 193 --> Processing Dependency: libsemanage-python >= 2.5-14 for package: policycoreutils-python-2.5-34.el7.x86_64 194 --> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreutils-python-2.5-34.el7.x86_64 195 --> Processing Dependency: python-IPy for package: policycoreutils-python-2.5-34.el7.x86_64 196 --> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64 197 --> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64 198 --> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64 199 --> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-34.el7.x86_64 200 --> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64 201 --> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64 202 ---> Package slirp4netns.x86_64 0:0.4.3-4.el7_8 will be installed 203 --> Running transaction check 204 ---> Package audit-libs-python.x86_64 0:2.8.5-4.el7 will be installed 205 ---> Package checkpolicy.x86_64 0:2.5-8.el7 will be installed 206 ---> Package fuse3-libs.x86_64 0:3.6.1-4.el7 will be installed 207 ---> Package libsemanage-python.x86_64 0:2.5-14.el7 will be installed 208 ---> Package python-IPy.noarch 0:0.75-6.el7 will be installed 209 ---> Package setools-libs.x86_64 0:3.3.8-4.el7 will be installed 210 --> Finished Dependency Resolution 211 212 Dependencies Resolved 213 214 ======================================================================================= 215 Package Arch Version Repository Size 216 ======================================================================================= 217 Installing: 218 docker-ce x86_64 3:20.10.2-3.el7 docker-ce-stable 27 M 219 Installing for dependencies: 220 audit-libs-python x86_64 2.8.5-4.el7 base 76 k 221 checkpolicy x86_64 2.5-8.el7 base 295 k 222 container-selinux noarch 2:2.119.2-1.911c772.el7_8 extras 40 k 223 containerd.io x86_64 1.4.3-3.1.el7 docker-ce-stable 33 M 224 docker-ce-cli x86_64 1:20.10.2-3.el7 docker-ce-stable 33 M 225 docker-ce-rootless-extras x86_64 20.10.2-3.el7 docker-ce-stable 9.0 M 226 fuse-overlayfs x86_64 0.7.2-6.el7_8 extras 54 k 227 fuse3-libs x86_64 3.6.1-4.el7 extras 82 k 228 libcgroup x86_64 0.41-21.el7 base 66 k 229 libseccomp x86_64 2.3.1-4.el7 base 56 k 230 libsemanage-python x86_64 2.5-14.el7 base 113 k 231 policycoreutils-python x86_64 2.5-34.el7 base 457 k 232 python-IPy noarch 0.75-6.el7 base 32 k 233 setools-libs x86_64 3.3.8-4.el7 base 620 k 234 slirp4netns x86_64 0.4.3-4.el7_8 extras 81 k 235 236 Transaction Summary 237 ======================================================================================= 238 Install 1 Package (+15 Dependent packages) 239 240 Total download size: 104 M 241 Installed size: 428 M 242 Downloading packages: 243 (1/16): audit-libs-python-2.8.5-4.el7.x86_64.rpm | 76 kB 00:00:00 244 (2/16): container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm | 40 kB 00:00:00 245 (3/16): checkpolicy-2.5-8.el7.x86_64.rpm | 295 kB 00:00:00 246 containerd.io-1.4.3-3.1.el7.x8 FAILED ] 382 kB/s | 40 MB 00:02:50 ETA 247 https://mirrors.aliyun.com/docker-ce/linux/centos/7/x86_64/stable/Packages/containerd.io-1.4.3-3.1.el7.x86_64.rpm: [Errno 14] curl#18 - "transfer closed with 15278780 bytes remaining to read" 248 Trying other mirror. 249 warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/docker-ce-20.10.2-3.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY 250 Public key for docker-ce-20.10.2-3.el7.x86_64.rpm is not installed 251 (4/16): docker-ce-20.10.2-3.el7.x86_64.rpm | 27 MB 00:02:27 252 (5/16): docker-ce-cli-20.10.2-3.el7.x86_64.rpm | 33 MB 00:02:19 253 (6/16): fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm | 54 kB 00:00:00 254 (7/16): libseccomp-2.3.1-4.el7.x86_64.rpm | 56 kB 00:00:00 255 (8/16): fuse3-libs-3.6.1-4.el7.x86_64.rpm | 82 kB 00:00:00 256 (9/16): libcgroup-0.41-21.el7.x86_64.rpm | 66 kB 00:00:00 257 (10/16): python-IPy-0.75-6.el7.noarch.rpm | 32 kB 00:00:00 258 (11/16): slirp4netns-0.4.3-4.el7_8.x86_64.rpm | 81 kB 00:00:00 259 (12/16): setools-libs-3.3.8-4.el7.x86_64.rpm | 620 kB 00:00:01 260 (13/16): policycoreutils-python-2.5-34.el7.x86_64.rpm | 457 kB 00:00:01 261 (14/16): libsemanage-python-2.5-14.el7.x86_64.rpm | 113 kB 00:00:04 262 (15/16): docker-ce-rootless-extras-20.10.2-3.el7.x86_64.rpm | 9.0 MB 00:00:33 263 264 265 Error downloading packages: 266 containerd.io-1.4.3-3.1.el7.x86_64: [Errno 256] No more mirrors to try. 267 268 [root@7 ~]# sudo yum -y install docker-ce 269 Loaded plugins: fastestmirror 270 Loading mirror speeds from cached hostfile 271 * base: mirrors.ustc.edu.cn 272 * extras: mirrors.163.com 273 * updates: mirrors.ustc.edu.cn 274 Resolving Dependencies 275 --> Running transaction check 276 ---> Package docker-ce.x86_64 3:20.10.2-3.el7 will be installed 277 --> Processing Dependency: container-selinux >= 2:2.74 for package: 3:docker-ce-20.10.2-3.el7.x86_64 278 --> Processing Dependency: containerd.io >= 1.4.1 for package: 3:docker-ce-20.10.2-3.el7.x86_64 279 --> Processing Dependency: libseccomp >= 2.3 for package: 3:docker-ce-20.10.2-3.el7.x86_64 280 --> Processing Dependency: docker-ce-cli for package: 3:docker-ce-20.10.2-3.el7.x86_64 281 --> Processing Dependency: docker-ce-rootless-extras for package: 3:docker-ce-20.10.2-3.el7.x86_64 282 --> Processing Dependency: libcgroup for package: 3:docker-ce-20.10.2-3.el7.x86_64 283 --> Running transaction check 284 ---> Package container-selinux.noarch 2:2.119.2-1.911c772.el7_8 will be installed 285 --> Processing Dependency: policycoreutils-python for package: 2:container-selinux-2.119.2-1.911c772.el7_8.noarch 286 ---> Package containerd.io.x86_64 0:1.4.3-3.1.el7 will be installed 287 ---> Package docker-ce-cli.x86_64 1:20.10.2-3.el7 will be installed 288 ---> Package docker-ce-rootless-extras.x86_64 0:20.10.2-3.el7 will be installed 289 --> Processing Dependency: fuse-overlayfs >= 0.7 for package: docker-ce-rootless-extras-20.10.2-3.el7.x86_64 290 --> Processing Dependency: slirp4netns >= 0.4 for package: docker-ce-rootless-extras-20.10.2-3.el7.x86_64 291 ---> Package libcgroup.x86_64 0:0.41-21.el7 will be installed 292 ---> Package libseccomp.x86_64 0:2.3.1-4.el7 will be installed 293 --> Running transaction check 294 ---> Package fuse-overlayfs.x86_64 0:0.7.2-6.el7_8 will be installed 295 --> Processing Dependency: libfuse3.so.3(FUSE_3.2)(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64 296 --> Processing Dependency: libfuse3.so.3(FUSE_3.0)(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64 297 --> Processing Dependency: libfuse3.so.3()(64bit) for package: fuse-overlayfs-0.7.2-6.el7_8.x86_64 298 ---> Package policycoreutils-python.x86_64 0:2.5-34.el7 will be installed 299 --> Processing Dependency: setools-libs >= 3.3.8-4 for package: policycoreutils-python-2.5-34.el7.x86_64 300 --> Processing Dependency: libsemanage-python >= 2.5-14 for package: policycoreutils-python-2.5-34.el7.x86_64 301 --> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreutils-python-2.5-34.el7.x86_64 302 --> Processing Dependency: python-IPy for package: policycoreutils-python-2.5-34.el7.x86_64 303 --> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64 304 --> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64 305 --> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64 306 --> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-34.el7.x86_64 307 --> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64 308 --> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64 309 ---> Package slirp4netns.x86_64 0:0.4.3-4.el7_8 will be installed 310 --> Running transaction check 311 ---> Package audit-libs-python.x86_64 0:2.8.5-4.el7 will be installed 312 ---> Package checkpolicy.x86_64 0:2.5-8.el7 will be installed 313 ---> Package fuse3-libs.x86_64 0:3.6.1-4.el7 will be installed 314 ---> Package libsemanage-python.x86_64 0:2.5-14.el7 will be installed 315 ---> Package python-IPy.noarch 0:0.75-6.el7 will be installed 316 ---> Package setools-libs.x86_64 0:3.3.8-4.el7 will be installed 317 --> Finished Dependency Resolution 318 319 Dependencies Resolved 320 321 ========================================================================================================================= 322 Package Arch Version Repository Size 323 ========================================================================================================================= 324 Installing: 325 docker-ce x86_64 3:20.10.2-3.el7 docker-ce-stable 27 M 326 Installing for dependencies: 327 audit-libs-python x86_64 2.8.5-4.el7 base 76 k 328 checkpolicy x86_64 2.5-8.el7 base 295 k 329 container-selinux noarch 2:2.119.2-1.911c772.el7_8 extras 40 k 330 containerd.io x86_64 1.4.3-3.1.el7 docker-ce-stable 33 M 331 docker-ce-cli x86_64 1:20.10.2-3.el7 docker-ce-stable 33 M 332 docker-ce-rootless-extras x86_64 20.10.2-3.el7 docker-ce-stable 9.0 M 333 fuse-overlayfs x86_64 0.7.2-6.el7_8 extras 54 k 334 fuse3-libs x86_64 3.6.1-4.el7 extras 82 k 335 libcgroup x86_64 0.41-21.el7 base 66 k 336 libseccomp x86_64 2.3.1-4.el7 base 56 k 337 libsemanage-python x86_64 2.5-14.el7 base 113 k 338 policycoreutils-python x86_64 2.5-34.el7 base 457 k 339 python-IPy noarch 0.75-6.el7 base 32 k 340 setools-libs x86_64 3.3.8-4.el7 base 620 k 341 slirp4netns x86_64 0.4.3-4.el7_8 extras 81 k 342 343 Transaction Summary 344 ========================================================================================================================= 345 Install 1 Package (+15 Dependent packages) 346 347 Total size: 104 M 348 Total download size: 33 M 349 Installed size: 428 M 350 Downloading packages: 351 Delta RPMs disabled because /usr/bin/applydeltarpm not installed. 352 warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/containerd.io-1.4.3-3.1.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY 353 Public key for containerd.io-1.4.3-3.1.el7.x86_64.rpm is not installed 354 containerd.io-1.4.3-3.1.el7.x86_64.rpm | 33 MB 00:01:11 355 Retrieving key from https://mirrors.aliyun.com/docker-ce/linux/centos/gpg 356 Importing GPG key 0x621E9F35: 357 Userid : "Docker Release (CE rpm) <docker@docker.com>" 358 Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35 359 From : https://mirrors.aliyun.com/docker-ce/linux/centos/gpg 360 Running transaction check 361 Running transaction test 362 Transaction test succeeded 363 Running transaction 364 Installing : libseccomp-2.3.1-4.el7.x86_64 1/16 365 Installing : libcgroup-0.41-21.el7.x86_64 2/16 366 Installing : slirp4netns-0.4.3-4.el7_8.x86_64 3/16 367 Installing : setools-libs-3.3.8-4.el7.x86_64 4/16 368 Installing : audit-libs-python-2.8.5-4.el7.x86_64 5/16 369 Installing : python-IPy-0.75-6.el7.noarch 6/16 370 Installing : 1:docker-ce-cli-20.10.2-3.el7.x86_64 7/16 371 Installing : checkpolicy-2.5-8.el7.x86_64 8/16 372 Installing : fuse3-libs-3.6.1-4.el7.x86_64 9/16 373 Installing : fuse-overlayfs-0.7.2-6.el7_8.x86_64 10/16 374 Installing : libsemanage-python-2.5-14.el7.x86_64 11/16 375 Installing : policycoreutils-python-2.5-34.el7.x86_64 12/16 376 Installing : 2:container-selinux-2.119.2-1.911c772.el7_8.noarch 13/16 377 Installing : containerd.io-1.4.3-3.1.el7.x86_64 14/16 378 Installing : docker-ce-rootless-extras-20.10.2-3.el7.x86_64 15/16 379 Installing : 3:docker-ce-20.10.2-3.el7.x86_64 16/16 380 Verifying : libsemanage-python-2.5-14.el7.x86_64 1/16 381 Verifying : fuse3-libs-3.6.1-4.el7.x86_64 2/16 382 Verifying : 3:docker-ce-20.10.2-3.el7.x86_64 3/16 383 Verifying : checkpolicy-2.5-8.el7.x86_64 4/16 384 Verifying : fuse-overlayfs-0.7.2-6.el7_8.x86_64 5/16 385 Verifying : 1:docker-ce-cli-20.10.2-3.el7.x86_64 6/16 386 Verifying : slirp4netns-0.4.3-4.el7_8.x86_64 7/16 387 Verifying : 2:container-selinux-2.119.2-1.911c772.el7_8.noarch 8/16 388 Verifying : python-IPy-0.75-6.el7.noarch 9/16 389 Verifying : libseccomp-2.3.1-4.el7.x86_64 10/16 390 Verifying : containerd.io-1.4.3-3.1.el7.x86_64 11/16 391 Verifying : docker-ce-rootless-extras-20.10.2-3.el7.x86_64 12/16 392 Verifying : policycoreutils-python-2.5-34.el7.x86_64 13/16 393 Verifying : audit-libs-python-2.8.5-4.el7.x86_64 14/16 394 Verifying : setools-libs-3.3.8-4.el7.x86_64 15/16 395 Verifying : libcgroup-0.41-21.el7.x86_64 16/16 396 397 Installed: 398 docker-ce.x86_64 3:20.10.2-3.el7 399 400 Dependency Installed: 401 audit-libs-python.x86_64 0:2.8.5-4.el7 checkpolicy.x86_64 0:2.5-8.el7 402 container-selinux.noarch 2:2.119.2-1.911c772.el7_8 containerd.io.x86_64 0:1.4.3-3.1.el7 403 docker-ce-cli.x86_64 1:20.10.2-3.el7 docker-ce-rootless-extras.x86_64 0:20.10.2-3.el7 404 fuse-overlayfs.x86_64 0:0.7.2-6.el7_8 fuse3-libs.x86_64 0:3.6.1-4.el7 405 libcgroup.x86_64 0:0.41-21.el7 libseccomp.x86_64 0:2.3.1-4.el7 406 libsemanage-python.x86_64 0:2.5-14.el7 policycoreutils-python.x86_64 0:2.5-34.el7 407 python-IPy.noarch 0:0.75-6.el7 setools-libs.x86_64 0:3.3.8-4.el7 408 slirp4netns.x86_64 0:0.4.3-4.el7_8 409 410 Complete! 411 [root@7 ~]# sudo service docker start 412 Redirecting to /bin/systemctl start docker.service 413 [root@7 ~]# docker info 414 Client: 415 Context: default 416 Debug Mode: false 417 Plugins: 418 app: Docker App (Docker Inc., v0.9.1-beta3) 419 buildx: Build with BuildKit (Docker Inc., v0.5.1-docker) 420 421 Server: 422 Containers: 0 423 Running: 0 424 Paused: 0 425 Stopped: 0 426 Images: 0 427 Server Version: 20.10.2 428 Storage Driver: overlay2 429 Backing Filesystem: xfs 430 Supports d_type: true 431 Native Overlay Diff: true 432 Logging Driver: json-file 433 Cgroup Driver: cgroupfs 434 Cgroup Version: 1 435 Plugins: 436 Volume: local 437 Network: bridge host ipvlan macvlan null overlay 438 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog 439 Swarm: inactive 440 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc 441 Default Runtime: runc 442 Init Binary: docker-init 443 containerd version: 269548fa27e0089a8b8278fc4fc781d7f65a939b 444 runc version: ff819c7e9184c13b7c2607fe6c30ae19403a7aff 445 init version: de40ad0 446 Security Options: 447 seccomp 448 Profile: default 449 Kernel Version: 3.10.0-1160.el7.x86_64 450 Operating System: CentOS Linux 7 (Core) 451 OSType: linux 452 Architecture: x86_64 453 CPUs: 1 454 Total Memory: 1.777GiB 455 Name: 7.0 456 ID: IW2W:7ZNK:FICS:PQA5:QHAR:TUM4:IG5D:FKDR:5AVB:OY2W:Q22W:L5HQ 457 Docker Root Dir: /var/lib/docker 458 Debug Mode: false 459 Registry: https://index.docker.io/v1/ 460 Labels: 461 Experimental: false 462 Insecure Registries: 463 127.0.0.0/8 464 Live Restore Enabled: false
欢迎指正~~