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
and is specified in the [schema 1 manifest definition](./manifest-v2-1.md)
7
+
# Image Manifest
14
8
15
-
This second schema version has two primary goals. The first is to allow
16
-
multi-architecture images, through a "fat manifest" which references image
17
-
manifests for platform-specific versions of an image. The second is to
18
-
move the Docker engine towards content-addressable images, by supporting
19
-
an image model where the image's configuration can be hashed to generate
20
-
an ID for the image.
9
+
There are three main goals of the Image Manifest Specification.
10
+
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.
11
+
The second goal is to allow multi-architecture images, through a "fat manifest" which references image manifests for platform-specific versions of an image.
12
+
The third goal is to be translatable to the [OpenContainers/runtime-spec](https://github.com/opencontainers/runtime-spec)
21
13
22
14
# Media Types
23
15
24
-
The following media types are used by the manifest formats described here, and
25
-
the resources they reference:
16
+
The following media types are used by the manifest formats described here, and the resources they reference:
This REQUIRED property specifies the size in bytes of the object.
56
+
This field exists so that a client will have an expected size for the content before validating.
57
+
If the length of the retrieved content does not match the specified length, the content should not be trusted.
83
58
84
-
-**`architecture`***string*
59
+
-**`digest`***string*
85
60
86
-
The architecture field specifies the CPU architecture, for example
87
-
`amd64` or `ppc64le`.
61
+
The digest of the content, as defined by the [Registry V2 HTTP API Specificiation](https://docs.docker.com/registry/spec/api/#digest-parameter).
88
62
89
-
-**`os`***string*
63
+
-**`platform`***object*
90
64
91
-
The os field specifies the operating system, for example
92
-
`linux` or `windows`.
65
+
This REQUIRED property describes the platform which the image in the manifest runs on.
66
+
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)
93
67
94
-
-**`os.version`***string*
68
+
-**`architecture`***string*
95
69
96
-
The optional os.version field specifies the operating system version,
97
-
for example `10.0.10586`.
70
+
This REQUIRED property specified the CPU architecture, for example `amd64` or `ppc64le`.
98
71
99
-
-**`os.features`***array*
72
+
-**`os`***string*
100
73
101
-
The optional os.features field specifies an array of strings,
102
-
each listing a required OS feature (for example on Windows
103
-
`win32k`).
74
+
This REQUIRED property specifies the operating system, for example `linux` or `windows`.
104
75
105
-
-**`variant`***string*
76
+
-**`os.version`***string*
106
77
107
-
The optional variant field specifies a variant of the CPU, for
108
-
example `armv6l` to specify a particular CPU variant of the ARM CPU.
78
+
This optional property specifies the operating system version, for example `10.0.10586`.
109
79
110
-
-**`features`***array*
80
+
-**`os.features`***array*
111
81
112
-
The optional features field specifies an array of strings, each
113
-
listing a required CPU feature (for example `sse4` or `aes`).
82
+
This OPTIONAL property specifies an array of strings, each specifying a mandatory OS feature (for example on Windows `win32k`).
83
+
84
+
-**`variant`***string*
85
+
86
+
This OPTIONAL property specifies the variant of the CPU, for example `armv6l` to specify a particular CPU variant of the ARM CPU.
87
+
88
+
-**`features`***array*
89
+
90
+
This OPTIONAL property specifies an array of strings, each specifying a mandatory CPU feature (for example `sse4` or `aes`).
114
91
115
92
## Example Manifest List
116
93
117
94
*Example showing a simple manifest list pointing to image manifests for two platforms:*
@@ -246,39 +216,22 @@ image. It's the direct replacement for the schema-1 manifest.
246
216
247
217
# Backward compatibility
248
218
249
-
The registry will continue to accept uploads of manifests in both the old and
250
-
new formats.
251
-
252
-
When pushing images, clients which support the new manifest format should first
253
-
construct a manifest in the new format. If uploading this manifest fails,
254
-
presumably because the registry only supports the old format, the client may
255
-
fall back to uploading a manifest in the old format.
256
-
257
-
When pulling images, clients indicate support for this new version of the
258
-
manifest format by sending the
259
-
`application/vnd.docker.distribution.manifest.v2+json` and
260
-
`application/vnd.docker.distribution.manifest.list.v2+json` media types in an
261
-
`Accept` header when making a request to the `manifests` endpoint. Updated
262
-
clients should check the `Content-Type` header to see whether the manifest
263
-
returned from the endpoint is in the old format, or is an image manifest or
264
-
manifest list in the new format.
265
-
266
-
If the manifest being requested uses the new format, and the appropriate media
267
-
type is not present in an `Accept` header, the registry will assume that the
268
-
client cannot handle the manifest as-is, and rewrite it on the fly into the old
269
-
format. If the object that would otherwise be returned is a manifest list, the
270
-
registry will look up the appropriate manifest for the amd64 platform and
271
-
linux OS, rewrite that manifest into the old format if necessary, and return
272
-
the result to the client. If no suitable manifest is found in the manifest
273
-
list, the registry will return a 404 error.
274
-
275
-
One of the challenges in rewriting manifests to the old format is that the old
276
-
format involves an image configuration for each layer in the manifest, but the
277
-
new format only provides one image configuration. To work around this, the
278
-
registry will create synthetic image configurations for all layers except the
279
-
top layer. These image configurations will not result in runnable images on
280
-
their own, but only serve to fill in the parent chain in a compatible way.
281
-
The IDs in these synthetic configurations will be derived from hashes of their
282
-
respective blobs. The registry will create these configurations and their IDs
283
-
using the same scheme as Docker 1.10 when it creates a legacy manifest to push
284
-
to a registry which doesn't support the new format.
219
+
The registry will continue to accept uploads of manifests in both the old and new formats.
220
+
221
+
When pushing images, clients which support the new manifest format should first construct a manifest in the new format.
222
+
If uploading this manifest fails, presumably because the registry only supports the old format, the client may fall back to uploading a manifest in the old format.
223
+
224
+
When pulling images, clients indicate support for this new version of the manifest format by sending the
225
+
`application/vnd.oci.image.manifest.v1+json` and
226
+
`application/vnd.oci.image.manifest.list.v1+json` media types in an `Accept` header when making a request to the `manifests` endpoint.
227
+
Updated clients should check the `Content-Type` header to see whether the manifest returned from the endpoint is in the old format, or is an image manifest or manifest list in the new format.
228
+
229
+
If the manifest being requested uses the new format, and the appropriate media type is not present in an `Accept` header, the registry will assume that the client cannot handle the manifest as-is, and rewrite it on the fly into the old format.
230
+
If the object that would otherwise be returned is a manifest list, the registry will look up the appropriate manifest for the amd64 platform and linux OS, rewrite that manifest into the old format if necessary, and return the result to the client.
231
+
If no suitable manifest is found in the manifest list, the registry will return a 404 error.
232
+
233
+
One of the challenges in rewriting manifests to the old format is that the old format involves an image configuration for each layer in the manifest, but the new format only provides one image configuration.
234
+
To work around this, the registry will create synthetic image configurations for all layers except the top layer.
235
+
These image configurations will not result in runnable images on their own, but only serve to fill in the parent chain in a compatible way.
236
+
The IDs in these synthetic configurations will be derived from hashes of their respective blobs.
237
+
The registry will create these configurations and their IDs using the same scheme as Docker 1.10 when it creates a legacy manifest to push to a registry which doesn't support the new format.
0 commit comments