#下载阿里yum源2
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
#生成仓库缓存
yum makecache
yum install docker -y
# 启动docker
systemctl start docker
# 开机启动docker
systemctl enable docker
# 查看docker状态
systemctl status docker
# 重启docker
systemctl restart docker