安装
在线安装:输入下面命令,等待安装完成即可
#关闭防火墙
systemctl stop firewalld.service
systemctl disable firewalld.serviceyum install -y docker# 修改docker拉取源为国内
rm -rf /etc/docker
mkdir -p /etc/docker
touch /etc/docker/daemon.json
cat >/etc/docker/daemon.json<<EOF{"registry-mirrors": ["https://registry.docker-cn.com","https://dockerhub.azk8s.cn","https://hub-mirror.c.163.com","https://9cpn8tt6.mirror.aliyuncs.com","https://yxzrazem.mirror.aliyuncs.com","https://pzxet6qr.mirror.aliyuncs.com","https://docker.mirrors.ustc.edu.cn"]}
EOF# 启动docker
systemctl start docker
sudo systemctl daemon-reload
# 设置开机自动启动docker
systemctl enable docker.service
查看是否安装成功
docker version