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
Copy file name to clipboardExpand all lines: descriptor.md
+24-9Lines changed: 24 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,20 +41,20 @@ The following fields contain the primary properties that constitute a Descriptor
41
41
42
42
-**`annotations`***string-string map*
43
43
44
-
This OPTIONAL property contains arbitrary metadata for this descriptor.
45
-
This OPTIONAL property MUST use the [annotation rules](annotations.md#rules).
44
+
This OPTIONAL property contains arbitrary metadata for this descriptor.
45
+
This OPTIONAL property MUST use the [annotation rules](annotations.md#rules).
46
46
47
-
Descriptors pointing to [`application/vnd.oci.image.manifest.v1+json`](manifest.md) SHOULD include the extended field `platform`, see [Image Index Property Descriptions](image-index.md#image-index-property-descriptions) for details.
48
-
49
-
### Reserved
47
+
-**`data`***string*
50
48
51
-
The following field keys are reserved and MUST NOT be used by other specifications.
49
+
This OPTIONAL property contains an embedded representation of the referenced content.
50
+
Values MUST conform to the Base 64 encoding, as defined in [RFC 4648][rfc4648-s4].
51
+
The decoded data MUST be identical to the referenced content and SHOULD be verified against the [`digest`](#digests) and `size` fields by content consumers.
52
+
See [Embedded Content](#embedded-content) for when this is appropriate.
52
53
53
-
-**`data`***string*
54
+
Descriptors pointing to [`application/vnd.oci.image.manifest.v1+json`](manifest.md) SHOULD include the extended field `platform`, see [Image Index Property Descriptions](image-index.md#image-index-property-descriptions) for details.
54
55
55
-
This key is RESERVED for future versions of the specification.
56
+
### Reserved
56
57
57
-
All other fields may be included in other OCI specifications.
58
58
Extended _Descriptor_ field additions proposed in other OCI specifications SHOULD first be considered for addition into this specification.
59
59
60
60
## Digests
@@ -151,6 +151,20 @@ Implementations MAY implement SHA-512 digest verification for use in descriptors
151
151
When the _algorithm identifier_ is `sha512`, the _encoded_ portion MUST match `/[a-f0-9]{128}/`.
152
152
Note that `[A-F]` MUST NOT be used here.
153
153
154
+
## Embedded Content
155
+
156
+
In many contexts, such as when downloading content over a network, resolving a descriptor to its content has a measurable fixed "roundtrip" latency cost.
157
+
For large blobs, the fixed cost is usually inconsequential, as the majority of time will be spent actually fetching the content.
158
+
For very small blobs, the fixed cost can be quite significant.
159
+
160
+
Implementations MAY choose to embed small pieces of content directly within a descriptor to avoid roundtrips.
161
+
162
+
Implementations MUST NOT populate the `data` field in situations where doing so would modify existing content identifiers.
163
+
For example, a registry MUST NOT arbitrarily populate `data` fields within uploaded manifests, as that would modify the content identifier of those manifests.
164
+
In contrast, a client MAY populate the `data` field before uploading a manifest, because the manifest would not yet have a content identifier in the registry.
165
+
166
+
Implementations SHOULD consider portability when deciding whether to embed data, as some providers are known to refuse to accept or parse manifests that exceed a certain size.
167
+
154
168
## Examples
155
169
156
170
The following example describes a [_Manifest_](manifest.md#image-manifest) with a content identifier of "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270" and a size of 7682 bytes:
@@ -179,6 +193,7 @@ In the following example, the descriptor indicates that the referenced manifest
0 commit comments