Skip to content

Commit b36f351

Browse files
authored
Merge pull request #142 from philips/layers-and-diffids
serialization: add explanation of DiffIDs
2 parents 7871606 + 67893d5 commit b36f351

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

serialization.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@ This specification uses the following terms:
3636
Layer DiffID
3737
</dt>
3838
<dd>
39-
Layers are referenced by cryptographic hashes of their serialized representation.
40-
This is a SHA256 digest over the tar archive used to transport the layer, represented as a hexadecimal encoding of 256 bits, e.g., <code>sha256:a9561eb1b190625c9adb5a9513e72c4dedafc1cb2d4c5236c9a6957ec7dfd5a9</code>.
39+
A layer DiffID is a SHA256 digest over the layer's uncompressed tar archive and serialized in the descriptor digest format, e.g., <code>sha256:a9561eb1b190625c9adb5a9513e72c4dedafc1cb2d4c5236c9a6957ec7dfd5a9</code>.
4140
Layers must be packed and unpacked reproducibly to avoid changing the layer ID, for example by using tar-split to save the tar headers.
42-
Note that the digest used as the layer ID is taken over an uncompressed version of the tar.
41+
NOTE: the DiffID is different than the digest in the manifest list because the manifest digest is taken over the gzipped layer for `application/vnd.oci.image.serialization.rootfs.tar.gzip` types.
4342
</dd>
4443
<dt>
4544
Layer ChainID

0 commit comments

Comments
 (0)