1, Docker system requirements CentOS kernel version higher than 3.10, see this page prerequisite to verify your CentOS version supports Docker.
By uname -r to see your current kernel version command
$ uname -r
2, log in as root administrator
[holly@holly ~]$ su
Password:
3, turn off the firewall, temporarily shut down and permanently closed
[root@holly holly]# systemctl stop firewalld [root@holly holly]# systemctl disable firewalld
4, required installation package, yum-util provide yum-config-manager function, the other two are driven dependent devicemapper
[root@holly holly]# yum install -y yum-utils device-mapper-persistent-data lvm2
5, set the yum source, download resources
[root@holly holly]# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
6, installation docker
[root@holly holly]# yum install docker-ce
7, registered Ali cloud