docker build报错:unknown-sha256:

更新于 阅读 2

docker打包时出现如下错误:

ERROR: failed to solve: node:18-alpine: failed to resolve source metadata for docker.io/library/node:18-alpine: failed commit on ref "unknown-sha256:xxxx": "unknown-sha256:xxx" failed size validation: 1355 != 1181: failed precondition

查阅得知是镜像问题,跟换docker镜像即可:

{ "registry-mirrors": [ "https://docker.zhai.cm", "https://a.ussh.net", "https://hub.littlediary.cn", "https://hub.rat.dev", "https://atomhub.openatom.cn", "https://docker.m.daocloud.io", "https://docker.1ms.run", "https://dytt.online", "https://func.ink", "https://lispy.org", "https://docker.xiaogenban1993.com", "https://docker.mybacc.com", "https://docker.yomansunter.com", "https://dockerhub.websoft9.com" ] }