ERROR [internal] load metadata for docker.io/library/node:20-alpine

avatar
作者
筋斗云
阅读量: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博客

广告一刻

为您即时展示最新活动产品广告消息,让您随时掌握产品活动新动态!