Centos8 stream安装docker

Centos8 stream安装docker
正常安装会报依赖有问题

# 把出错的包先删掉,哪个出问题删哪个
yum -y erase podman buildah containerd.io

# 再安装剩下的

~~sudo yum-config-manager  --add-repo   https://download.docker.com/linux/centos/docker-ce.repo~~ 
# 毕竟谁又能拒绝阿里云镜像呢?[doge]
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

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

通过yum 安装完成docker执行搜索镜像的为命令,报Cannot connect to the Docker daemon错误

docker search centos
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

解决方法:重新加载daemon文件并重启docker

systemctl daemon-reload
systemctl restart docker
systemctl status docker

你可能感兴趣的:(docker,linux,centos)