我正在尝试从私有注册表中提取图像,但它因意外 EOF 而失败。
be8ec4e48d7f: Already exists
33b8b485aff0: Already exists
d887158cc58c: Already exists
05895bb28c18: Already exists
3717254b824f: Already exists
5d1752e32f1f: Already exists
98554cf2e2ec: Already exists
3a83ccd2f4ee: Already exists
c793dcd65f37: Already exists
c4412ad3121f: Already exists
eba3bc56bff9: Already exists
2b1b6e815dce: Already exists
dda735bf3557: Already exists
dbece9223ffc: Already exists
49533680b25f: Already exists
8d332721c923: Already exists
d40c3e8ecbdb: Already exists
75f43ec617dd: Already exists
225f75c25e6b: Already exists
81811c4b9e22: Already exists
409197acab0f: Already exists
9b5199518afc: Already exists
b7040ab58553: Already exists
b6e55490ca80: Already exists
e04c7210075d: Already exists
68db66ab7dda: Already exists
bbe68713195e: Already exists
1d7c9599b03c: Already exists
c7472ba4bdbd: Already exists
3c4082628c2e: Already exists
50f7a489c209: Already exists
aaf98f685aa2: Already exists
8cf31fcd419c: Already exists
a80092fe6016: Already exists
9d90bdef5603: Already exists
9d13d2b62b19: Already exists
cab2bcedcfdf: Already exists
41670cbb355b: Already exists
4036f94db6f4: Retrying in 19 seconds
42f95b51f0f7: Download complete
91f3ac158888: Download complete
df09d420f619: Download complete
7ca46f747969: Download complete
34e5e5eb8b2f: Download complete
ce8b1ad11171: Download complete
4b124d6694bd: Download complete
a71b50d0f70c: Download complete
237b8823183b: Download complete
4036f94db6f4: Downloading 12.41MB/12.41MB
64858da6aaea: Download complete
3e88dcb59e3e: Download complete
aa92021cb41d: Download complete
0569c05fcc65: Download complete
63ee9c05e34b: Download complete
48ac0999fcdb: Download complete
e10d1975849c: Download complete
611db2146c6f: Download complete
7ad4e600c6c6: Download complete
4261ad6f88e3: Download complete
c20e2f82fd11: Download complete
49f62c0b1913: Download complete
cb37060da14d: Download complete
f19eda2c4fb2: Download complete
e600fca97576: Download complete
508947b05054: Download complete
652c4860c2f3: Download complete
358d27eb7aaa: Download complete
27cfd1cb1501: Download complete
673d626b28c0: Download complete
20d0b16ebf52: Download complete
0cfff8a600f6: Download complete
00065e08cdfc: Download complete
bd51e67b9159: Download complete
7e8e6548bdec: Download complete
1dea31859db5: Download complete
f058efbc49a4: Download complete
3e10bb0abdd8: Download complete
617d42f04950: Download complete
798390048c18: Download complete
2b389764a032: Download complete
002f5c6ccc90: Download complete
unexpected EOF
我已尝试删除此处建议的图层 Docker pull “unexpected EOF” 但即使我使用新标签和 --no-cache 构建图像,相同的错误仍然存在。
我的工作流程如下:
- 图像是使用 Jenkins 构建的。
- 图像被推送到私有 Docker 注册表。
- 镜像在 Kubernetes 节点中被拉取。
我该如何进一步调试呢?或者强行删除图层,以及依赖它的图像。
我有一个图像 I couldn't pull :
这就是它最后的样子。拉动图像时,它看起来像这样:
因此,
eaf17779ae5d
是罪魁祸首。让我们找出完整的哈希:并尝试确认我们是否可以下载它:
我们不能,因此让我们删除图层:
然后再次推送图像:
请注意
a17a1099bdbb: Pushed
行。这意味着该图层已上传(推送)。还要注意哈希值不同(本地哈希值和注册表中的哈希值)。在pull
期间,它显示注册表哈希,在push
本地哈希期间。本地哈希可能只是一个随机字符串,远程哈希很可能是数据的哈希。或者也许他们散列不同的东西或不同的东西。要找出与您可以通过摘要获得清单的内容相对应的内容:然后获取配置(参见上一个命令输出中的
.config.digest
):sha256:eaf17779ae5dc4e74e2aba3dcefc629f5b5717adb20facc93c6e726664637aca
是倒数第二个,sha256:a17a1099bdbb31acadd8c8ef1da7ab734e14405ed3072383a1699708af512de4
也是。那就是比赛。无论如何,如果您只删除一层,则应该只有一条“推”线。
让我们确认它是否有效:
全部完成。虽然我的回答基本上重复了你提到的那个,但我相信我提供了更多细节,这里有几个链接以防万一:
Missing image layer in a docker registry
Examining images and docker registry
此外,如果它没有帮助,您可能需要运行垃圾收集: