No package docker-ce available. Error: Nothing to do

The command to install docker: yum -y install docker-ce reports an error:

 Solution:

1. Download the relevant dependent environment about docker

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

2. Set the image source for downloading Docker

yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

3. Clear cache

yum clean 

4. Install the cache

yum makecache fast

5. Reinstall docker

 yum -y install docker-ce

Guess you like

Origin blog.csdn.net/weixin_43824829/article/details/130337852