|
3 | 3 | There are three main goals of the Image Manifest Specification. |
4 | 4 | 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. |
5 | 5 | 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 | | -The third goal is to be translatable to the [OpenContainers/runtime-spec](https://github.com/opencontainers/runtime-spec) |
| 6 | +In OCI, this is codified in a [Manifest List](manifest-list.md). |
| 7 | +The third goal is to be translatable to the [OCI Runtime Specification](https://github.com/opencontainers/runtime-spec). |
7 | 8 |
|
8 | | -This section defines the `application/vnd.oci.image.manifest.list.v1+json` and `application/vnd.oci.image.manifest.v1+json` [media types](media-types.md). |
9 | | - |
10 | | -# Manifest List |
11 | | - |
12 | | -The manifest list is the "fat manifest" which points to specific image manifests for one or more platforms. |
13 | | -While the use of a manifest list is OPTIONAL for image providers, image consumers SHOULD be prepared to process them. |
14 | | -A client will distinguish a manifest list from an image manifest based on the Content-Type returned in the HTTP response. |
15 | | - |
16 | | -## *Manifest List* Property Descriptions |
17 | | - |
18 | | -- **`schemaVersion`** *int* |
19 | | - |
20 | | - This REQUIRED property specifies the image manifest schema version. |
21 | | - For this version of the specification, this MUST be `2` to ensure backward compatibility with older versions of Docker. The value of this field will not change. This field MAY be removed in a future version of the specification. |
22 | | - |
23 | | -- **`mediaType`** *string* |
24 | | - |
25 | | - This REQUIRED property contains the media type of the manifest list. |
26 | | - For this version of the specification, this MUST be set to `application/vnd.oci.image.manifest.list.v1+json`. |
27 | | - For the media type(s) that this is compatible with see the [matrix](media-types.md#compatibility-matrix). |
28 | | - |
29 | | -- **`manifests`** *array* |
30 | | - |
31 | | - This REQUIRED property contains a list of manifests for specific platforms. |
32 | | - While the property MUST be present, the size of the array MAY be zero. |
33 | | - |
34 | | - Each object in the manifest is a [descriptor](descriptor.md) with the following additional properties and restrictions: |
35 | | - |
36 | | - - **`mediaType`** *object* |
37 | | - |
38 | | - This [descriptor property](descriptor.md#properties) has additional restrictions for `manifests`. |
39 | | - Implementations MUST support at least the following media types: |
40 | | - |
41 | | - - [`application/vnd.oci.image.manifest.v1+json`](#image-manifest) |
42 | | - |
43 | | - Manifest lists concerned with portability SHOULD use one of the above media types. |
44 | | - |
45 | | - - **`platform`** *object* |
46 | | - |
47 | | - This REQUIRED property describes the platform which the image in the manifest runs on. |
48 | | - A full list of valid operating system and architecture values are listed in the [Go language documentation for `$GOOS` and `$GOARCH`](https://golang.org/doc/install/source#environment) |
49 | | - |
50 | | - - **`architecture`** *string* |
51 | | - |
52 | | - This REQUIRED property specified the CPU architecture, for example `amd64` or `ppc64le`. |
53 | | - |
54 | | - - **`os`** *string* |
55 | | - |
56 | | - This REQUIRED property specifies the operating system, for example `linux` or `windows`. |
57 | | - |
58 | | - - **`os.version`** *string* |
59 | | - |
60 | | - This OPTIONAL property specifies the operating system version, for example `10.0.10586`. |
61 | | - |
62 | | - - **`os.features`** *array* |
63 | | - |
64 | | - This OPTIONAL property specifies an array of strings, each specifying a mandatory OS feature (for example on Windows `win32k`). |
65 | | - |
66 | | - - **`variant`** *string* |
67 | | - |
68 | | - This OPTIONAL property specifies the variant of the CPU, for example `armv6l` to specify a particular CPU variant of the ARM CPU. |
69 | | - |
70 | | - - **`features`** *array* |
71 | | - |
72 | | - This OPTIONAL property specifies an array of strings, each specifying a mandatory CPU feature (for example `sse4` or `aes`). |
73 | | - |
74 | | -- **`annotations`** *string-string map* |
75 | | - |
76 | | - This OPTIONAL property contains arbitrary metadata for the manifest list. |
77 | | - Annotations MUST be a key-value map where both the key and value MUST be strings. |
78 | | - While the value MUST be present, it MAY be an empty string. |
79 | | - Keys MUST be unique within this map, and best practice is to namespace the keys. |
80 | | - Keys SHOULD be named using a reverse domain notation - e.g. `com.example.myKey`. |
81 | | - Keys using the `org.opencontainers` namespace are reserved and MUST NOT be used by other specifications. |
82 | | - If there are no annotations then this property MUST either be absent or be an empty map. |
83 | | - Implementations that are reading/processing manifest lists MUST NOT generate an error if they encounter an unknown annotation key. |
84 | | - |
85 | | - See [Pre-Defined Annotation Keys](#pre-defined-annotation-keys). |
86 | | - |
87 | | -### Extensibility |
88 | | -Implementations that are reading/processing manifest lists MUST NOT generate an error if they encounter an unknown property. |
89 | | -Instead they MUST ignore unknown properties. |
90 | | - |
91 | | -## Example Manifest List |
92 | | - |
93 | | -*Example showing a simple manifest list pointing to image manifests for two platforms:* |
94 | | -```json,title=Manifest%20List&mediatype=application/vnd.oci.image.manifest.list.v1%2Bjson |
95 | | -{ |
96 | | - "schemaVersion": 2, |
97 | | - "mediaType": "application/vnd.oci.image.manifest.list.v1+json", |
98 | | - "manifests": [ |
99 | | - { |
100 | | - "mediaType": "application/vnd.oci.image.manifest.v1+json", |
101 | | - "size": 7143, |
102 | | - "digest": "sha256:e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f", |
103 | | - "platform": { |
104 | | - "architecture": "ppc64le", |
105 | | - "os": "linux" |
106 | | - } |
107 | | - }, |
108 | | - { |
109 | | - "mediaType": "application/vnd.oci.image.manifest.v1+json", |
110 | | - "size": 7682, |
111 | | - "digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270", |
112 | | - "platform": { |
113 | | - "architecture": "amd64", |
114 | | - "os": "linux", |
115 | | - "features": [ |
116 | | - "sse4" |
117 | | - ] |
118 | | - } |
119 | | - } |
120 | | - ], |
121 | | - "annotations": { |
122 | | - "com.example.key1": "value1", |
123 | | - "com.example.key2": "value2" |
124 | | - } |
125 | | -} |
126 | | -``` |
| 9 | +This section defines the `application/vnd.oci.image.manifest.v1+json` [media type](media-types.md). |
127 | 10 |
|
128 | 11 | # Image Manifest |
129 | 12 |
|
130 | | -Unlike the [Manifest List](#manifest-list), 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. |
| 13 | +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. |
131 | 14 |
|
132 | 15 | ## *Image Manifest* Property Descriptions |
133 | 16 |
|
|
0 commit comments