1、docker官网
Install Docker Engine on CentOS | Docker Documentation
yum -y install gcc
yum -y install gcc-c++
yum install -y yum-utils
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum makecache fast
yum install docker-ce docker-ce-cli containerd.io docker-compose-plugin
systemctl start docker
ps -ef | grep docker
出现如下说明安装成功
docker version