安装Docker:
yum install docker-ce
出现错误如下:
Error:
Problem: problem with installed package buildah-1.11.6-7.module_el8.2.0+305+5e198a41.x86_64
- package buildah-1.11.6-7.module_el8.2.0+305+5e198a41.x86_64 requires runc >= 1.0.0-26, but none of the providers can be installed
- package containerd.io-1.3.7-3.1.el8.x86_64 conflicts with runc provided by runc-1.0.0-65.rc10.module_el8.2.0+305+5e198a41.x86_64
- package containerd.io-1.3.7-3.1.el8.x86_64 obsoletes runc provided by runc-1.0.0-65.rc10.module_el8.2.0+305+5e198a41.x86_64
- package docker-ce-3:19.03.13-3.el8.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed
- conflicting requests
- package runc-1.0.0-56.rc5.dev.git2abd837.module_el8.2.0+303+1105185b.x86_64 is filtered out by modular filtering
- package runc-1.0.0-64.rc10.module_el8.2.0+304+65a3c2ac.x86_64 is filtered out by modular filtering
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
解决办法:
输入下面的命令继续安装:
yum install --allowerasing docker-ce
安装完成(最后显示Complete!):
[root@localhost leeho]# yum install --allowerasing docker-ce
Last metadata expiration check: 0:02:00 ago on Fri 13 Nov 2020 08:22:14 PM EST.
Dependencies resolved.
========================================================================================================================
Package Architecture Version Repository Size
========================================================================================================================
Installing:
docker-ce x86_64 3:19.03.13-3.el8 docker-ce-stable 24 M
Installing dependencies:
containerd.io x86_64 1.3.7-3.1.el8 docker-ce-stable 29 M
replacing runc.x86_64 1.0.0-65.rc10.module_el8.2.0+305+5e198a41
docker-ce-cli x86_64 1:19.03.13-3.el8 docker-ce-stable 38 M
libcgroup x86_64 0.41-19.el8 BaseOS 70 k
Removing dependent packages:
buildah x86_64 1.11.6-7.module_el8.2.0+305+5e198a41 @AppStream 35 M
Transaction Summary
========================================================================================================================
Install 4 Packages
Remove 1 Package
Total download size: 92 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): libcgroup-0.41-19.el8.x86_64.rpm 393 kB/s | 70 kB 00:00
(2/4): docker-ce-19.03.13-3.el8.x86_64.rpm 2.9 MB/s | 24 MB 00:08
(3/4): docker-ce-cli-19.03.13-3.el8.x86_64.rpm 2.3 MB/s | 38 MB 00:16
(4/4): containerd.io-1.3.7-3.1.el8.x86_64.rpm 1.1 MB/s | 29 MB 00:25
------------------------------------------------------------------------------------------------------------------------
Total 3.4 MB/s | 92 MB 00:26
warning: /var/cache/dnf/docker-ce-stable-fa9dc42ab4cec2f4/packages/containerd.io-1.3.7-3.1.el8.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Docker CE Stable - x86_64 2.8 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 : docker-ce-cli-1:19.03.13-3.el8.x86_64 1/6
Running scriptlet: docker-ce-cli-1:19.03.13-3.el8.x86_64 1/6
Installing : containerd.io-1.3.7-3.1.el8.x86_64 2/6
Running scriptlet: containerd.io-1.3.7-3.1.el8.x86_64 2/6
Running scriptlet: libcgroup-0.41-19.el8.x86_64 3/6
Installing : libcgroup-0.41-19.el8.x86_64 3/6
Running scriptlet: libcgroup-0.41-19.el8.x86_64 3/6
Installing : docker-ce-3:19.03.13-3.el8.x86_64 4/6
Running scriptlet: docker-ce-3:19.03.13-3.el8.x86_64 4/6
Erasing : buildah-1.11.6-7.module_el8.2.0+305+5e198a41.x86_64 5/6
Obsoleting : runc-1.0.0-65.rc10.module_el8.2.0+305+5e198a41.x86_64 6/6
Running scriptlet: runc-1.0.0-65.rc10.module_el8.2.0+305+5e198a41.x86_64 6/6
Verifying : libcgroup-0.41-19.el8.x86_64 1/6
Verifying : containerd.io-1.3.7-3.1.el8.x86_64 2/6
Verifying : runc-1.0.0-65.rc10.module_el8.2.0+305+5e198a41.x86_64 3/6
Verifying : docker-ce-3:19.03.13-3.el8.x86_64 4/6
Verifying : docker-ce-cli-1:19.03.13-3.el8.x86_64 5/6
Verifying : buildah-1.11.6-7.module_el8.2.0+305+5e198a41.x86_64 6/6
Installed products updated.
Installed:
containerd.io-1.3.7-3.1.el8.x86_64 docker-ce-3:19.03.13-3.el8.x86_64 docker-ce-cli-1:19.03.13-3.el8.x86_64
libcgroup-0.41-19.el8.x86_64
Removed:
buildah-1.11.6-7.module_el8.2.0+305+5e198a41.x86_64
Complete!
输入以下命令查看docker版本号:
docker version
显示为:
Client: Docker Engine - Community
Version: 19.03.13
API version: 1.40
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:02:36 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.13
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:01:11 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.3.7
GitCommit: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683