centos8安装docker

centos8默认使用podman代替docker,但是当前还是需要docker,
执行yum install docker-ce docker-ce-cli containerd.io,
会报错Problem: package docker-ce-3:19.03.3-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed

安装依赖

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

添加yum仓库

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

安装docker-ce

dnf -y  install docker-ce --nobest

docker开机自启

systemctl enable --now docker

添加当前用户到docker group

usermod -aG docker $USER
newgrp docker

 

你可能感兴趣的:(运维)