-
Let var Let var The variables Is there some other unique hash value for an image rather than image digest which remains constant whether the image is present locally or on a registry? If yes, how can one access it? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
@vrothberg @mtrmac PTAL |
Beta Was this translation helpful? Give feedback.
-
The digest differs between different registries, the id is constant - but only within a certain engine instance.
Where eefcea3 is the multi-arch manifest, and bbb248c is the amd64 image. |
Beta Was this translation helpful? Give feedback.
-
That’s not a bijection. A unique digest guarantees a specific image representation, but “the same” image can have many different representations: compressed/uncompressed, different compression algorithms, same compression algorithm but different choices made during compression, or perhaps even different whitespace in metadata.
To answer that correctly requires a very careful thinking about what you mean by “an image” or “the same image”. In the traditional understanding of these concepts (roughly “the same image” is a set of images that are deduplicated when pulling into a single locally-stored object), which might not at all be the semantics you want, there is no such universal value. The config digest is used that way for schema2 and OCI images, but schema1 images and multi-arch images don’t have that value. Typically, the approach needs to be to create a specific image representation, and then freeze that digest value, and work with that digest value. But really, this conversation should not start with these implementation details and build “up” from that low level. What are you actually trying to do? |
Beta Was this translation helpful? Give feedback.
That’s not a bijection. A unique digest guarantees a specific image representation, but “the same” image can have many different representations: compressed/uncompressed, different compression algorithms, same compression algorithm but different choices made during compression, or perhaps even different whitespace in metadata.
To answer that correctly requires a very careful thinking about what you mean by “an image” or “the same image”.
In the traditional understanding of t…