阅读量:5
docker编译时报错,除标题外,还报如下信息
ERROR: failed to solve: node:20-alpine: failed to resolve source metadata for docker.io/library/node:20-alpine: failed to do request: Head "https://registry-1.docker.io/v2/library/node/manifests/20-alpine": dial tcp [2600:1f18:2148:bc01:571f:e759:a87a:2961]:443: connect: network is unreachable
则更新 如下文件
vi /etc/resolv.conf
在其中添加如下代码即可
nameserver 114.114.114.114
然后可以通过 docker pull 该链接 来测试是否成功。
参见:
解决docker拉取镜像报错:Error response from daemon: Get “https://registry-1.docker.io/v2/“: dial tcp-CSDN博客