docker-安装

docker 安装

1、下载清华的repo到本地

https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/

wget https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo

2、 默认的地址为国外的地址,修改repo里面的地址为清华的地址

:%s@https://download.docker.com/@https://mirrors.tuna.tsinghua.edu.cn/docker-ce/@

3、 yum下载,创建Docker镜像加速配置文件,并启动查看docker相关信息

yum install docker-ce -y

配置Docker镜像加速

[root@node1 yum.repos.d]# cat /etc/docker/daemon.json 
{
    "registry-mirrors": ["https://registry.docker-cn.com"]
}

启动docker

systemctl start docker.service
docker version
docker info

docker info报错解决:

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled

[root@node1 yum.repos.d]# cat /etc/sysctl.conf 
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-arptables = 1
[root@node1 yum.repos.d]# sysctl -p
原文地址:https://www.cnblogs.com/mustark/p/10308069.html