You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Leaning heavily on the existing entries in RFC 6839. The suffix makes
it easy to clarify DiffIDs without requiring a particular layer media
type. It also allows you to create image-layout instances where the
layers are stored uncompressed, which may be useful for cases such as:
* Binary diffing between layer blobs for cheaper updates of large
layers [1].
* Compressing an image-layout tarball for a smaller smaller overall
tarball (by avoiding the unnecessary fragmentation of compressing
the individual blob entries).
[1]: http://ircbot.wl.linuxfoundation.org/eavesdrop/%23opencontainers/%23opencontainers.2016-08-16.log.html#t2016-08-16T23:35:43
Signed-off-by: W. Trevor King <[email protected]>
Copy file name to clipboardExpand all lines: config.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,8 @@ This specification uses the following terms:
32
32
<dd>
33
33
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>.
34
34
Layers must be packed and unpacked reproducibly to avoid changing the layer ID, for example by using tar-split to save the tar headers.
35
-
NOTE: the DiffID is different than the digest in the manifest list because the manifest digest is taken over the gzipped layer for <code>application/vnd.oci.image.layer.tar+gzip</code> types.
35
+
The DiffID is different than the layer digest in the <a href="manifest.md#image-manifest-property-descriptions">manifest's <code>layers</code></a> because the layer digest is taken over the blob regardless of compression, while the DiffID is taken after removing any compression.
36
+
For an <code>application/vnd.oci.image.layer.tar+gzip</code> layer, the layer digest is taken over the <code>application/vnd.oci.image.layer.tar+gzip</code> content, while the DiffID is take over the <code>application/vnd.oci.image.layer.tar</code> content.
Copy file name to clipboardExpand all lines: layer.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ This document will use a concrete example to illustrate how to create and consum
6
6
7
7
## Distributable Format
8
8
9
-
Layer Changesets for the [mediatype](./media-types.md)`application/vnd.oci.image.layer.tar+gzip` MUST be packaged in [tar archive][tar-archive].
10
-
Layer Changesets for the [mediatype](./media-types.md)`application/vnd.oci.image.layer.tar+gzip` MUST NOT include duplicate entries for file paths in the resulting [tar archive][tar-archive].
9
+
Layer Changesets for the [mediatype](./media-types.md)`application/vnd.oci.image.layer.tar` MUST be packaged in [tar archive][tar-archive].
10
+
Layer Changesets for the [mediatype](./media-types.md)`application/vnd.oci.image.layer.tar` MUST NOT include duplicate entries for file paths in the resulting [tar archive][tar-archive].
11
11
12
12
## Change Types
13
13
@@ -170,7 +170,7 @@ Where the basename name of `./etc/my-app-config` is now prefixed with `.wh.`, an
170
170
171
171
## Applying
172
172
173
-
Layer Changesets of [mediatype](./media-types.md)`application/vnd.oci.image.layer.tar+gzip` are applied rather than strictly extracted in normal fashion for tar archives.
173
+
Layer Changesets of [mediatype](./media-types.md)`application/vnd.oci.image.layer.tar` are applied rather than strictly extracted in normal fashion for tar archives.
174
174
175
175
Applying a layer changeset requires consideration for the [whiteout](#whiteouts) files.
176
176
In the absence of any [whiteout](#whiteouts) files in a layer changeset, the archive is extracted like a regular tar archive.
@@ -275,7 +275,7 @@ Any given image is likely to be composed of several of these Image Filesystem Ch
275
275
Certain layers, due to legal requirements, may not be regularly distributable.
276
276
Typically, such layers are downloaded directly from a distributor but are never uploaded.
277
277
278
-
Layers that have these restrictions SHOULD be tagged with an alternative mediatype of `application/vnd.oci.image.layer.nondistributable.tar+gzip`.
278
+
Layers that have these restrictions SHOULD be tagged with an alternative mediatype of `application/vnd.oci.image.layer.nondistributable.tar`.
279
279
[Descriptors](descriptor.md) referencing these layers MAY include `urls` for downloading these layers.
280
280
It is implementation-defined whether or not implementations upload layers tagged with this media type.
-`application/vnd.oci.image.layer.tar+gzip`: ["Layer", as a gzipped tar archive](layer.md)
10
-
-`application/vnd.oci.image.layer.nondistributable.tar+gzip`: ["Layer", as a gzipped tar that has distribution restrictions](layer.md#non-distributable-layers)
9
+
-`application/vnd.oci.image.layer.tar`: ["Layer", as a tar archive](layer.md)
10
+
-`application/vnd.oci.image.layer.nondistributable.tar`: ["Layer", as a tar archive with distribution restrictions](layer.md#non-distributable-layers)
11
+
12
+
## Suffixes
13
+
14
+
[RFC 6839][rfc6839] defines several structured syntax suffixes for use with media types.
15
+
This section adds additional structured syntax suffixes for use with media types in OCI Image contexts.
16
+
17
+
### The +gzip Structured Syntax Suffix
18
+
19
+
[GZIP][rfc1952] is a widely used compression format.
20
+
The media type [`application/gzip`][rfc6713] has been registered for such files.
21
+
The suffix `+gzip` MAY be used with any media type whose representation follows that established for `application/gzip`.
22
+
The media type structured syntax suffix registration form follows:
23
+
24
+
Name: GZIP file format
25
+
26
+
`+suffix`: `+gzip`
27
+
28
+
References: [[GZIP][rfc1952]]
29
+
30
+
Encoding considerations: GZIP is a binary encoding.
31
+
32
+
Fragment identifier considerations:
33
+
34
+
The syntax and semantics of fragment identifiers specified for `+gzip` SHOULD be as specified for `application/gzip`.
35
+
(At publication of this document, there is no fragment identification syntax defined for `application/gzip`.)
36
+
The syntax and semantics for fragment identifiers for a specific `xxx/yyy+gzip` SHOULD be processed as follows:
37
+
38
+
* For cases defined in `+gzip`, where the fragment identifier resolves per the `+gzip` rules, then process as specified in `+gzip`.
39
+
* For cases defined in `+gzip`, where the fragment identifier does not resolve per the `+gzip` rules, then process as specified in `xxx/yyy+gzip`.
40
+
* For cases not defined in `+gzip`, then process as specified in `xxx/yyy+gzip`.
41
+
42
+
Interoperability considerations: n/a
43
+
44
+
Security considerations:
45
+
46
+
See the "Security Considerations" sections of [RFC 1952][rfc1952] and [RFC 6713][rfc6713].
47
+
Each individual media type registered with a `+gzip` suffix can have additional security considerations.
11
48
12
49
## Compatibility Matrix
13
50
@@ -27,7 +64,7 @@ This section shows where the OCI Image Specification is compatible with formats
**Interchangeable and fully compatible mime-types**
33
70
@@ -47,3 +84,7 @@ The following figure shows how the above media types reference each other:
47
84
48
85
A reference is defined as the target content digest, as defined by the [Registry V2 HTTP API Specificiation](https://docs.docker.com/registry/spec/api/#digest-parameter).
49
86
The manifest list being a "fat manifest" references one or more image manifests per target platform. An image manifest references exactly one target configuration and possibly many layers.
0 commit comments