vim /etc/docker/daemon.json
{
"registry-mirrors" : ["https://registry.docker.docker-cn.com"]
}
修改配置后报错:
Error response from daemon: Get https://index.docker.io/v1/search?q=java&n=25: dial tcp: lookup index.docker.io: no such host
解决方案:
vim /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.8.4
重启服务
systemctl restart network