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博客