5.5 KiB
OCI Image Index Specification
The image index is a higher-level manifest which points to specific image manifests, ideal for one or more platforms. While the use of an image index is OPTIONAL for image providers, image consumers SHOULD be prepared to process them.
This section defines the application/vnd.oci.image.index.v1+json media type.
For the media type(s) that this document is compatible with, see the matrix.
Image Index Property Descriptions
-
schemaVersionintThis REQUIRED property specifies the image manifest schema version. For this version of the specification, this MUST be
2to 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. -
mediaTypestringThis property is reserved for use, to maintain compatibility. When used, this field contains the media type of this document, which differs from the descriptor use of
mediaType. -
manifestsarray of objectsThis REQUIRED property contains a list of manifests for specific platforms. While this property MUST be present, the size of the array MAY be zero.
Each object in
manifestsincludes a set of descriptor properties with the following additional properties and restrictions:-
mediaTypestringThis descriptor property has additional restrictions for
manifests. Implementations MUST support at least the following media types:Image indexes concerned with portability SHOULD use one of the above media types. Future versions of the spec MAY use a different mediatype (i.e. a new versioned format). An encountered
mediaTypethat is unknown SHOULD be safely ignored. -
platformobjectThis OPTIONAL property describes the minimum runtime requirements of the image. This property SHOULD be present if its target is platform-specific.
-
architecturestringThis REQUIRED property specifies the CPU architecture. Image indexes SHOULD use, and implementations SHOULD understand, values listed in the Go Language document for
GOARCH. -
osstringThis REQUIRED property specifies the operating system. Image indexes SHOULD use, and implementations SHOULD understand, values listed in the Go Language document for
GOOS. -
os.versionstringThis OPTIONAL property specifies the version of the operating system targeted by the referenced blob. Implementations MAY refuse to use manifests where
os.versionis not known to work with the host OS version. Valid values are implementation-defined. e.g.10.0.14393.1066onwindows. -
os.featuresarray of stringsThis OPTIONAL property specifies an array of strings, each specifying a mandatory OS feature. When
osiswindows, image indexes SHOULD use, and implementations SHOULD understand the following values:win32k: image requireswin32k.syson the host (Note:win32k.sysis missing on Nano Server)
When
osis notwindows, values are implementation-defined and SHOULD be submitted to this specification for standardization. -
variantstringThis OPTIONAL property specifies the variant of the CPU. Image indexes SHOULD use, and implementations SHOULD understand, values listed in the following table. When the variant of the CPU is not listed in the table, values are implementation-defined and SHOULD be submitted to this specification for standardization.
ISA/ABI architecturevariantARM 32-bit, v6 armv6ARM 32-bit, v7 armv7ARM 32-bit, v8 armv8ARM 64-bit, v8 arm64v8 -
featuresarray of stringsThis property is RESERVED for future versions of the specification.
-
-
-
annotationsstring-string mapThis OPTIONAL property contains arbitrary metadata for the image index. This OPTIONAL property MUST use the annotation rules.
Example Image Index
Example showing a simple image index pointing to image manifests for two platforms:
{
"schemaVersion": 2,
"manifests": [
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"size": 7143,
"digest": "sha256:e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f",
"platform": {
"architecture": "ppc64le",
"os": "linux"
}
},
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"size": 7682,
"digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270",
"platform": {
"architecture": "amd64",
"os": "linux"
}
}
],
"annotations": {
"com.example.key1": "value1",
"com.example.key2": "value2"
}
}