|
本帖最后由 gdtv 于 2024-10-16 21:46 编辑
我设置了 /etc/docker/daemon.json:
[ol]{ "registry-mirrors": [ "https://dockerproxy.com", "https://docker.nju.edu.cn", "https://docker.mirrors.ustc.edu.cn" ]}[/ol]复制代码
重启docker:
[ol]systemctl daemon-reload && systemctl restart docker[/ol]复制代码
启动docker:
[ol]root@test1:/data/docker-test# docker-compose upPulling db (mysql:5.6.51)...ERROR: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)[/ol]复制代码
好像没有调用国内的镜像?
-----------------------------
更新,可能还是镜像的问题,加多几个镜像可以了:
[ol]{ "registry-mirrors": [ "https://docker.nju.edu.cn", "https://docker.mirrors.ustc.edu.cn", "https://ustc-edu-cn.mirror.aliyuncs.com/", "https://ccr.ccs.tencentyun.com/", "https://docker.m.daocloud.io/" ]}[/ol]复制代码 |
|