繁体   English   中英

有没有办法只用它的 sha 找到一个层是由什么组成的?

[英]Is there a way to find what a layer was made from only with its sha?

This docker image https://hub.docker.com/layers/hseeberger/scala-sbt/8u222_1.3.5_2.13.1/images/sha256-c332b90d6141f34517dec9285601b246f4df7861d421d1fb8cc70ee157a098f2

不使用通常的FROM作为基础,而是ADD file:fdf0128645db4c8b990073dc4fe3fabad50411032c9aa4f86538d46e0e8f158f in /

有没有办法查看该层是从什么构建的/它的内容是什么/基本上确保它可以安全运行?

我不知道自动方式。 But the image is based on an OpenJDK image and I found the same hash in this image https://hub.docker.com/layers/openjdk/library/openjdk/8u222-stretch/images/sha256-c9170435c6535402241fc24cd9b426aa3db527be345231147775ad83ba145705?context=explore

OpenJDK 镜像发布于 2019 年 10 月 17 日,因为名称中有“stretch”,我猜测基础镜像可能是 Debian,我在 2019 年 10 月 14 日的 Debian 镜像中发现了相同的 hash https://hub.8587224 .com/layers/debian/library/debian/stretch-20191014/images/sha256-06888500a6e8fc2e2a06ddf83417b10660d457b1ba1e4a06bdcd427cfd394b31?context=explore

所以基础镜像是官方的debian:stretch-20191014镜像。 ADD命令通常用于创建官方操作系统基础映像,因为您可以从单个 tar 文件创建完整的文件系统。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM