Skip to content

Commit

Permalink
config: Drop the paragraph contrasting diffIDs with layer digests
Browse files Browse the repository at this point in the history
On Thu, Jan 19, 2017 at 02:48:16PM -0800, Stephen Day wrote [1]:
> A DiffID is narrow. It is part of the config, in `rootfs`. A DiffID
> is only ever taken over the uncompressed content.
>
> A layer digest may be taken over the uncompressed or compressed
> version of the content.

I agree with both of these points, but have been unable to convince Stephen that this is what I'm trying to show with this example.

> Arguably, this is not relevant to this document.

This paragraph was intended as a clarifying example, but it was never
normative.  Since we can't agree on clear wording, we can hopefully
agree that it's not needed ;).

[1]: opencontainers#388 (comment)

Signed-off-by: W. Trevor King <[email protected]>
  • Loading branch information
wking committed Jan 19, 2017
1 parent 63ce6dd commit 46ec151
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ Changing it means creating a new derived image, instead of changing the existing
A layer DiffID is a SHA256 digest over the layer's uncompressed tar archive and serialized in the descriptor digest format, e.g., `sha256:a9561eb1b190625c9adb5a9513e72c4dedafc1cb2d4c5236c9a6957ec7dfd5a9`.
Layers must be packed and unpacked reproducibly to avoid changing the layer DiffID, for example by using tar-split to save the tar headers.

The difference between DiffIDs and the layer digests in the [manifest's `layers`](manifest.md#image-manifest-property-descriptions) is that the layer digest is taken over the blob regardless of compression, while the DiffID is taken after removing any compression.
For an [`application/vnd.oci.image.layer.v1.tar+gzip`](layer.md) layer, the layer digest is taken over the `application/vnd.oci.image.layer.v1.tar+gzip` content, while the DiffID is take over the [`application/vnd.oci.image.layer.v1.tar`](media-types.md#oci-image-media-types) content.

### Layer ChainID

For convenience, it is sometimes useful to refer to a stack of layers with a single identifier.
Expand Down

0 comments on commit 46ec151

Please sign in to comment.