Skip to content

Commit 789e261

Browse files
committed
*: manifest-list -> image-index
It has come up a number of times that the manifest-list, while intentionally suited for pointing to a list of manifests, is intended to be a general index and entry-point. During the image-layout addition of `/index.json`, replacing the ./refs/ directory, it was recommended that we finally make this distinction in the manifest-list as well. This rename does not affect the compatibility with the docker v2.s2 manifest-list, as it is primarily a semantic change. Signed-off-by: Vincent Batts <[email protected]>
1 parent 5ef499e commit 789e261

20 files changed

+9466
-1089
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ DOC_FILES := \
2626
descriptor.md \
2727
image-layout.md \
2828
manifest.md \
29-
manifest-list.md \
29+
image-index.md \
3030
layer.md \
3131
config.md \
3232
annotations.md \

annotations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Consumers MUST NOT generate an error if they encounter an unknown annotation key
1515

1616
## Pre-Defined Annotation Keys
1717

18-
This specification defines the following annotation keys, intended for but not limited to manifest list and image manifest authors:
18+
This specification defines the following annotation keys, intended for but not limited to [image index](image-index.md) and image [manifest](manifest.md) authors:
1919
* **org.opencontainers.created** date on which the image was built (string, date-time as defined by [RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6)).
2020
* **org.opencontainers.authors** contact details of the people or organization responsible for the image (freeform string)
2121
* **org.opencontainers.homepage** URL to find more information on the image (string, a URL with scheme HTTP or HTTPS)

considerations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Extensibility
22

3-
Implementations that are reading/processing [manifests](manifest.md) or [manifest lists](manifest-list.md) MUST NOT generate an error if they encounter an unknown property.
3+
Implementations that are reading/processing [manifests](manifest.md) or [image indexes](image-index.md) MUST NOT generate an error if they encounter an unknown property.
44
Instead they MUST ignore unknown properties.
55

66
# Canonicalization

manifest-list.md image-index.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# OCI Image Manifest List Specification
1+
# OCI Image Index Specification
22

3-
The manifest list is a higher-level manifest which points to specific [image manifests](manifest.md) for one or more platforms.
4-
While the use of a manifest list is OPTIONAL for image providers, image consumers SHOULD be prepared to process them.
3+
The Image Index is a higher-level manifest which points to specific [image manifests](manifest.md), ideal for one or more platforms.
4+
While the use of an image index is OPTIONAL for image providers, image consumers SHOULD be prepared to process them.
55

6-
This section defines the `application/vnd.oci.image.manifest.list.v1+json` [media type](media-types.md).
6+
This section defines the `application/vnd.oci.image.index.v1+json` [media type](media-types.md).
77
For the media type(s) that this document is compatible with, see the [matrix][matrix].
88

9-
## *Manifest List* Property Descriptions
9+
## *Image Index* Property Descriptions
1010

1111
- **`schemaVersion`** *int*
1212

@@ -34,7 +34,7 @@ For the media type(s) that this document is compatible with, see the [matrix][ma
3434

3535
- [`application/vnd.oci.image.manifest.v1+json`](manifest.md)
3636

37-
Manifest lists concerned with portability SHOULD use one of the above media types.
37+
Image Indexes concerned with portability SHOULD use one of the above media types.
3838
Future versions of the spec MAY use a different mediatype (i.e. a new versioned format).
3939
An encountered `mediaType` that is unknown SHOULD be safely ignored.
4040

@@ -46,12 +46,12 @@ For the media type(s) that this document is compatible with, see the [matrix][ma
4646
- **`architecture`** *string*
4747

4848
This REQUIRED property specifies the CPU architecture.
49-
Manifest lists SHOULD use, and implementations SHOULD understand, values [supported by runtime-spec's `platform.arch`][runtime-platform2].
49+
Image Indexes SHOULD use, and implementations SHOULD understand, values [supported by runtime-spec's `platform.arch`][runtime-platform2].
5050

5151
- **`os`** *string*
5252

5353
This REQUIRED property specifies the operating system.
54-
Manifest lists SHOULD use, and implementations SHOULD understand, values [supported by runtime-spec's `platform.os`][runtime-platform2].
54+
Image Indexes SHOULD use, and implementations SHOULD understand, values [supported by runtime-spec's `platform.os`][runtime-platform2].
5555

5656
- **`os.version`** *string*
5757

@@ -71,15 +71,15 @@ For the media type(s) that this document is compatible with, see the [matrix][ma
7171

7272
- **`annotations`** *string-string map*
7373

74-
This OPTIONAL property contains arbitrary metadata for the manifest list.
74+
This OPTIONAL property contains arbitrary metadata for the image index.
7575
This OPTIONAL property MUST use the [annotation rules](annotations.md#rules).
7676

7777
See [Pre-Defined Annotation Keys](annotations.md#pre-defined-annotation-keys).
7878

79-
## Example Manifest List
79+
## Example Image Index
8080

81-
*Example showing a simple manifest list pointing to image manifests for two platforms:*
82-
```json,title=Manifest%20List&mediatype=application/vnd.oci.image.manifest.list.v1%2Bjson
81+
*Example showing a simple image index pointing to image manifests for two platforms:*
82+
```json,title=Image%20Index&mediatype=application/vnd.oci.image.index.v1%2Bjson
8383
{
8484
"schemaVersion": 2,
8585
"manifests": [

image-layout.md

+10-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This layout MAY be used in a variety of different transport mechanisms: archive
55

66
Given an image layout and a ref, a tool can create an [OCI Runtime Specification bundle](https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc3/bundle.md) by:
77

8-
* Following the ref to find a [manifest](manifest.md#image-manifest), possibly via a [manifest list](manifest-list.md#manifest-list)
8+
* Following the ref to find a [manifest](manifest.md#image-manifest), possibly via an [image index](image-index.md)
99
* [Applying the filesystem layers](layer.md#applying) in the specified order
1010
* Converting the [image configuration](config.md) into an [OCI Runtime Specification `config.json`](https://github.com/opencontainers/runtime-spec/blob/v1.0.0-rc3/config.md)
1111

@@ -27,7 +27,7 @@ The image layout is as follows:
2727
- `index.json` file
2828
- It MUST exist
2929
- It MUST be a JSON object
30-
- It MUST have the base properties of [manifest-list](manifest-list.md).
30+
- It MUST have the base properties of an [image index](image-index.md).
3131
- See [index.json](#indexjson-file) section
3232

3333
## Example Layout
@@ -143,12 +143,12 @@ The `imageLayoutVersion` value will align with the OCI Image Specification versi
143143
## index.json file
144144

145145
This REQUIRED file is the entry point for references and descriptors of the image-layout.
146-
The [manifest-list](manifest-list.md) is a multi-descriptor entry point.
146+
The [image index](image-index.md) is a multi-descriptor entry point.
147147

148148
This index provides an established path (`/index.json`) to have an entry point for an image-layout and to discover auxiliary descriptors.
149149

150150
No semantic restriction is given for the "org.opencontainers.ref.name" annotation of descriptors.
151-
In general the `mediaType` of each [descriptor][descriptors] object in the `manifests` field will be either `application/vnd.oci.image.manifest.list.v1+json` or `application/vnd.oci.image.manifest.v1+json`
151+
In general the `mediaType` of each [descriptor][descriptors] object in the `manifests` field will be either `application/vnd.oci.image.index.v1+json` or `application/vnd.oci.image.manifest.v1+json`
152152
Future versions of the spec MAY use a different mediatype (i.e. a new versioned format).
153153
An encountered `mediaType` that is unknown SHOULD be safely ignored.
154154

@@ -162,12 +162,12 @@ Those tags will often be represented in an image-layout repository with matching
162162

163163
### Index Example
164164

165-
```json,title=Manifest%20List&mediatype=application/vnd.oci.image.manifest.list.v1%2Bjson
165+
```json,title=Manifest%20List&mediatype=application/vnd.oci.image.index.v1%2Bjson
166166
{
167167
"schemaVersion": 2,
168168
"manifests": [
169169
{
170-
"mediaType": "application/vnd.oci.image.manifest.v1+json",
170+
"mediaType": "application/vnd.oci.image.index.v1+json",
171171
"size": 7143,
172172
"digest": "sha256:0228f90e926ba6b96e4f39cf294b2586d38fbb5a1e385c05cd1ee40ea54fe7fd",
173173
"annotations": {
@@ -178,6 +178,10 @@ Those tags will often be represented in an image-layout repository with matching
178178
"mediaType": "application/vnd.oci.image.manifest.v1+json",
179179
"size": 7143,
180180
"digest": "sha256:e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f",
181+
"platform": {
182+
"architecture": "ppc64le",
183+
"os": "linux"
184+
},
181185
"annotations": {
182186
"org.opencontainers.ref.name": "v1.0"
183187
}

img/media-types.dot

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
digraph G {
22
{
3-
manifestList [shape=note, label="Manifest list\n<<optional>>\napplication/vnd.oci.image.manifest.list.v1+json"]
3+
imageIndex [shape=note, label="Image Index<<optional>>\napplication/vnd.oci.image.index.v1+json"]
44
manifest [shape=note, label="Image manifest\napplication/vnd.oci.image.manifest.v1+json"]
55
config [shape=note, label="Image JSON\napplication/vnd.oci.image.config.v1+json"]
66
layer [shape=note, label="Layer tar archive\napplication/vnd.oci.image.layer.v1.tar\napplication/vnd.oci.image.layer.v1.tar+gzip\napplication/vnd.oci.image.layer.nondistributable.v1.tar\napplication/vnd.oci.image.layer.nondistributable.v1.tar+gzip"]
77
}
88

9-
manifestList -> manifest [label="1..*"]
9+
imageIndex -> manifest [label="1..*"]
1010
manifest -> config [label="1..1"]
1111
manifest -> layer [label="1..*"]
1212
}

img/media-types.png

-687 Bytes
Loading

manifest.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
There are three main goals of the Image Manifest Specification.
44
The first goal is content-addressable images, by supporting an image model where the image's configuration can be hashed to generate a unique ID for the image and its components.
55
The second goal is to allow multi-architecture images, through a "fat manifest" which references image manifests for platform-specific versions of an image.
6-
In OCI, this is codified in a [Manifest List](manifest-list.md).
6+
In OCI, this is codified in an [Image Index](image-index.md).
77
The third goal is to be translatable to the [OCI Runtime Specification](https://github.com/opencontainers/runtime-spec).
88

99
This section defines the `application/vnd.oci.image.manifest.v1+json` [media type](media-types.md).
1010
For the media type(s) that this is compatible with see the [matrix](media-types.md#compatibility-matrix).
1111

1212
# Image Manifest
1313

14-
Unlike the [Manifest List](manifest-list.md), which contains information about a set of images that can span a variety of architectures and operating systems, an image manifest provides a configuration and set of layers for a single container image for a specific architecture and operating system.
14+
Unlike the [Image Index](image-index.md), which contains information about a set of images that can span a variety of architectures and operating systems, an image manifest provides a configuration and set of layers for a single container image for a specific architecture and operating system.
1515

1616
## *Image Manifest* Property Descriptions
1717

media-types.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The following media types identify the formats described here and their referenced resources:
44

55
- `application/vnd.oci.descriptor.v1+json`: [Content Descriptor](descriptor.md)
6-
- `application/vnd.oci.image.manifest.list.v1+json`: [Manifest list](manifest-list.md#manifest-list)
6+
- `application/vnd.oci.image.index.v1+json`: [Image Index](image-index.md)
77
- `application/vnd.oci.image.manifest.v1+json`: [Image manifest](manifest.md#image-manifest)
88
- `application/vnd.oci.image.config.v1+json`: [Image config](config.md)
99
- `application/vnd.oci.image.layer.v1.tar`: ["Layer", as a tar archive](layer.md)
@@ -31,7 +31,7 @@ The OCI Image Specification strives to be backwards and forwards compatible when
3131
Breaking compatibility with existing systems creates a burden on users whether they are build systems, distribution systems, container engines, etc.
3232
This section shows where the OCI Image Specification is compatible with formats external to the OCI Image and different versions of this specification.
3333

34-
### application/vnd.oci.image.manifest.list.v1+json
34+
### application/vnd.oci.image.index.v1+json
3535

3636
**Similar/related schema**
3737

@@ -62,6 +62,6 @@ The following figure shows how the above media types reference each other:
6262
![](img/media-types.png)
6363

6464
[Descriptors](descriptor.md) are used for all references.
65-
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.
65+
The image-index 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.
6666

6767
[rfc1952]: https://tools.ietf.org/html/rfc1952

schema/backwards_compatibility_test.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
)
2626

2727
var compatMap = map[string]string{
28-
"application/vnd.docker.distribution.manifest.list.v2+json": v1.MediaTypeImageManifestList,
28+
"application/vnd.docker.distribution.manifest.list.v2+json": v1.MediaTypeImageIndex,
2929
"application/vnd.docker.distribution.manifest.v2+json": v1.MediaTypeImageManifest,
3030
"application/vnd.docker.image.rootfs.diff.tar.gzip": v1.MediaTypeImageLayer,
3131
"application/vnd.docker.container.image.v1+json": v1.MediaTypeImageConfig,
@@ -42,15 +42,15 @@ func convertFormats(input string) string {
4242
return out
4343
}
4444

45-
func TestBackwardsCompatibilityManifestList(t *testing.T) {
45+
func TestBackwardsCompatibilityImageIndex(t *testing.T) {
4646
for i, tt := range []struct {
47-
manifestlist string
48-
digest digest.Digest
49-
fail bool
47+
imageIndex string
48+
digest digest.Digest
49+
fail bool
5050
}{
5151
{
5252
digest: "sha256:219f4b61132fe9d09b0ec5c15517be2ca712e4744b0e0cc3be71295b35b2a467",
53-
manifestlist: `{
53+
imageIndex: `{
5454
"schemaVersion": 2,
5555
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
5656
"manifests": [
@@ -109,14 +109,14 @@ func TestBackwardsCompatibilityManifestList(t *testing.T) {
109109
fail: false,
110110
},
111111
} {
112-
got := digest.FromString(tt.manifestlist)
112+
got := digest.FromString(tt.imageIndex)
113113
if tt.digest != got {
114114
t.Errorf("test %d: expected digest %s but got %s", i, tt.digest, got)
115115
}
116116

117-
manifestlist := convertFormats(tt.manifestlist)
118-
r := strings.NewReader(manifestlist)
119-
err := schema.ValidatorMediaTypeManifestList.Validate(r)
117+
imageIndex := convertFormats(tt.imageIndex)
118+
r := strings.NewReader(imageIndex)
119+
err := schema.ValidatorMediaTypeImageIndex.Validate(r)
120120

121121
if got := err != nil; tt.fail != got {
122122
t.Errorf("test %d: expected validation failure %t but got %t, err %v", i, tt.fail, got, err)

0 commit comments

Comments
 (0)