Skip to content

Commit c6854a6

Browse files
committed
image-index: add the subject field
Fixes: #1002 This allows for an image-index / manifest-list (_still_ the better name than "image-index" ...) to point to the blob of another manifest. This is a part of the referrer API in the distribution-spec. Signed-off-by: Vincent Batts <[email protected]>
1 parent e7236d5 commit c6854a6

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

image-index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ For the media type(s) that this document is compatible with, see the [matrix][ma
8787

8888
If multiple manifests match a client or runtime's requirements, the first matching entry SHOULD be used.
8989

90+
- **`subject`** *[descriptor](descriptor.md)*
91+
92+
This OPTIONAL property specifies a [descriptor](descriptor.md) of another manifest.
93+
This value, used by the [`referrers` API](https://github.com/opencontainers/distribution-spec/blob/main/spec.md#listing-referrers), indicates a relationship to the specified manifest.
94+
9095
- **`annotations`** *string-string map*
9196

9297
This OPTIONAL property contains arbitrary metadata for the image index.

schema/image-index-schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
"description": "the mediatype of the referenced object",
1616
"$ref": "defs-descriptor.json#/definitions/mediaType"
1717
},
18+
"subject": {
19+
"$ref": "content-descriptor.json"
20+
},
1821
"manifests": {
1922
"type": "array",
2023
"items": {

specs-go/v1/index.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ type Index struct {
2727
// Manifests references platform specific manifests.
2828
Manifests []Descriptor `json:"manifests"`
2929

30+
// Subject is an optional link from the image manifest to another manifest forming an association between the image manifest and the other manifest.
31+
Subject *Descriptor `json:"subject,omitempty"`
32+
3033
// Annotations contains arbitrary metadata for the image index.
3134
Annotations map[string]string `json:"annotations,omitempty"`
3235
}

0 commit comments

Comments
 (0)