# 加载docker源
wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/centos/docker-ce.repo
# 把软件仓库地址替换为 TUNA:
sed -i ‘s+download.docker.com+mirrors.tuna.tsinghua.edu.cn/docker-ce+‘ /etc/yum.repos.d/docker-ce.repo
# 安装
yum install docker-ce -y
# 启动并加入开启自启动
systemctl start docker
systemctl enable docker
systemctl status docker
#
#
#
#
#
#
#
原文:https://www.cnblogs.com/suyj/p/14180419.html