Cent OS 8安装docker并解决docker和podman冲突问题

1、更新yum

$ sudo yum -y update

2、centos8默认使用podman代替docker,所以需要containerd.io,那我们就安装一下就好了

$ yum install https://download.docker.com/linux/fedora/30/x86_64/stable/Packages/containerd.io-1.2.6-3.3.fc30.x86_64.rpm

3、安装其他依赖

$ yum install -y yum-utils device-mapper-persistent-data lvm2
$ yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

4、安装docker,出现了错误

$ yum install docker-ce docker-ce-cli containerd.io

Error:
Problem 1: problem with installed package podman-2.2.1-7.module_el8.3.0+699+d61d9c41.x86_64
(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)

因为centos8默认使用podman代替docker,直接安装docker会产生冲突,因此:

$ yum erase podman buildah
$ yum install docker-ce docker-ce-cli containerd.io

5、安装完成后查看版本

$ docker -v

你可能感兴趣的:(软件测试常用工具,docker)