1.查看是否安装了docker
ps -ef | grep docker
2.开始安装docker
yum install -y docker
3.安装完成后 禁用防火墙,与selinux
查看防火墙状态:
systemctl status firewalld.service
关闭防火墙:
systemctl stop firewalld.service
禁用防火墙:
systemctl disabled firewalld.service
重启机器,
查看防火墙(systemctl status firewalld.service)
与selinux状态(命令:getenforce)
4.启动docker
systemctl start docker
如果下载镜像较慢 可以修改 /etc/docker/daemon.json
{
“registry-mirrors”: [“https://docker.mirrors.ustc.edu.cn/”,“https://hub-mirror.c.163.com”,“https://registry.docker-cn.com”],
“insecure-registries”: [“10.0.0.12:5000”]
}