关于

centos 安装 docker

替换 阿里云 yum 源

#下载阿里yum源2
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 

#生成仓库缓存 
yum makecache  
 

安装 docker

yum install docker -y

# 启动docker
systemctl start docker  

# 开机启动docker
systemctl enable docker

# 查看docker状态
systemctl status docker 

# 重启docker
systemctl restart docker