docker 拉取代码时出现
ERROR: failed to solve: node:16: unexpected status from HEAD request to https:// xxxxxx.mirror.aliyuncs.com/v2/library/node/manifests/16?ns=docker.io: 403 Forb idden
ERROR: failed to solve: node:16: failed to do request: Head "https://mirror.ccs. tencentyun.com/v2/library/node/manifests/16?ns=docker.io": dial tcp: lookup mirr or.ccs.tencentyun.com on 10.200.200.70:53: no such host
Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: re quest canceled while waiting for connection (Client.Timeout exceeded while await
类似以上错误
需要配置镜像加速
vim /etc/docker/daemon.json
然后添加以下内容
{
"registry-mirrors": [ "https://docker.m.daocloud.io" ]
}
保存并退出,重新启动一下docker
systemctl restart docker
我这里使用的是Daocloud 镜像加速器地址:https://docker.m.daocloud.io
你也可以尝试使用其他镜像加速地址,但是各大高校以及容器技术社区,由于众所周不知的原因, 纷纷关闭多个镜像加速站点。