If you had already installed docker, completely remove docker
Non- docker-ce version uninstall
docker-ce version uninstall
Listed docker associated with the installed packages
yum list installed | grep docker
Delete the relevant installation package
yum -y remove docker-ce-cli.x86_64
Install the specified version docker
Tools required for installation and configuration
yum install -y yum-utils yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
View version
yum list docker-ce --showduplicates|sort -r
can be seen
Select the specified version is installed
Installation ( all the way to select y installation )
yum install docker-ce-18.06.1.ce-3.el7 docker-ce-selinux-18.06.1.ce-3.el7
At the same time set up and boot from Kai
systemctl enable docker && sudo systemctl start docker
Finally, test
docker --version
Export
Docker version 18.06.1-ce, build e68fc7a
Successful installation