1. 安装命令
yum install docker -y
2.配置阿里云镜像
mkdir -p /etc/docker
#打开文件,编写内容
tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://72j07b5y.mirror.aliyuncs.com"]
}
EOF
3.开机自启
sudo systemctl enable docker
4. 启动docker服务
sudo systemctl start docker
5.重启docker
systemctl restart docker
6.查看docker状态
systemctl status docker