docker修改了daemon.js文件还是下载不了镜像
新建了个虚拟机,安装了docker,下载不了镜像,提示https://registry-1.docker.io访问不了
修改了daemon。js文件,加入了阿里云的镜像地址,修改完成后,重新加载配置文件,重新启动docker,使用docker info查看没有问题,但是就是跳转 https://registry-1.docker.io 去下载镜像;郁闷了很久,检索了大量资料,记录一下,
1)修改dns,网络配置文件,增加dns
2)使用这个配置文件 vim /etc/docker/daemon.json
{
"dns": ["8.8.8.8", "8.8.4.4"],
"registry-mirrors": [
"https://docker.m.daocloud.io/",
"https://huecker.io/",
"https://dockerhub.timeweb.cloud",
"https://noohub.ru/",
"https://dockerproxy.com",
"https://docker.mirrors.ustc.edu.cn",
"https://docker.nju.edu.cn",
"https://xx4bwyg2.mirror.aliyuncs.com",
"http://f1361db2.m.daocloud.io",
"https://registry.docker-cn.com",
"http://hub-mirror.c.163.com"
],
"runtimes": {
"nvidia": {
"path": "nvidia-container-runtime",
"runtimeArgs": []
}
}
}
runtimes去掉,别人在服务器上安装了GPU
重新加载配置 systemctl daemon-reload
docker 重新启动 systemctl restart docker
阿里的镜像地址好像有问题,不知道为啥
参考链接
解决Error Get "https://registry-1.docker.io/v2/":环境报错问题 - 白码一号 - 博客园