2016-10-14 22:40:45 +00:00
|
|
|
---
|
|
|
|
title: "Image Manifest V 2, Schema 1 "
|
|
|
|
description: "image manifest for the Registry."
|
2017-10-20 18:16:21 +00:00
|
|
|
keywords: registry, on-prem, images, tags, repository, distribution, api, advanced, manifest
|
2016-10-14 22:40:45 +00:00
|
|
|
---
|
2015-11-20 02:21:03 +00:00
|
|
|
|
2016-04-12 23:14:33 +00:00
|
|
|
# Image Manifest Version 2, Schema 1
|
2015-04-08 21:49:00 +00:00
|
|
|
|
2022-11-25 15:54:21 +00:00
|
|
|
> **Deprecated**
|
|
|
|
>
|
|
|
|
> Image Manifest v2, Schema 1 is deprecated. Use [Image Manifest v2, Schema 2](manifest-v2-2.md),
|
|
|
|
> or the [OCI Image Specification](https://github.com/opencontainers/image-spec).
|
|
|
|
> Image Manifest v2, Schema 1 should not be used for purposes other than backward
|
|
|
|
> compatibility.
|
|
|
|
|
2016-11-28 19:28:33 +00:00
|
|
|
This document outlines the format of the V2 image manifest. The image
|
2015-06-08 20:48:48 +00:00
|
|
|
manifest described herein was introduced in the Docker daemon in the [v1.3.0
|
|
|
|
release](https://github.com/docker/docker/commit/9f482a66ab37ec396ac61ed0c00d59122ac07453).
|
|
|
|
It is a provisional manifest to provide a compatibility with the [V1 Image
|
|
|
|
format](https://github.com/docker/docker/blob/master/image/spec/v1.md), as the
|
|
|
|
requirements are defined for the [V2 Schema 2
|
2020-08-24 11:18:39 +00:00
|
|
|
image](https://github.com/distribution/distribution/pull/62).
|
2015-06-08 20:48:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
Image manifests describe the various constituents of a docker image. Image
|
|
|
|
manifests can be serialized to JSON format with the following media types:
|
2015-04-08 21:49:00 +00:00
|
|
|
|
|
|
|
Manifest Type | Media Type
|
|
|
|
------------- | -------------
|
|
|
|
manifest | "application/vnd.docker.distribution.manifest.v1+json"
|
|
|
|
signed manifest | "application/vnd.docker.distribution.manifest.v1+prettyjws"
|
|
|
|
|
|
|
|
*Note that "application/json" will also be accepted for schema 1.*
|
|
|
|
|
2016-04-12 23:14:33 +00:00
|
|
|
References:
|
|
|
|
|
|
|
|
- [Proposal: JSON Registry API V2.1](https://github.com/docker/docker/issues/9015)
|
2015-04-08 21:49:00 +00:00
|
|
|
- [Proposal: Provenance step 1 - Transform images for validation and verification](https://github.com/docker/docker/issues/8093)
|
|
|
|
|
|
|
|
## *Manifest* Field Descriptions
|
|
|
|
|
|
|
|
Manifest provides the base accessible fields for working with V2 image format
|
|
|
|
in the registry.
|
|
|
|
|
|
|
|
- **`name`** *string*
|
|
|
|
|
|
|
|
name is the name of the image's repository
|
|
|
|
|
|
|
|
- **`tag`** *string*
|
2016-04-12 23:14:33 +00:00
|
|
|
|
2015-04-08 21:49:00 +00:00
|
|
|
tag is the tag of the image
|
2016-04-12 23:14:33 +00:00
|
|
|
|
2015-04-08 21:49:00 +00:00
|
|
|
- **`architecture`** *string*
|
|
|
|
|
2016-04-12 23:14:33 +00:00
|
|
|
architecture is the host architecture on which this image is intended to
|
2015-04-08 21:49:00 +00:00
|
|
|
run. This is for information purposes and not currently used by the engine
|
2016-04-12 23:14:33 +00:00
|
|
|
|
2015-04-08 21:49:00 +00:00
|
|
|
- **`fsLayers`** *array*
|
2016-04-12 23:14:33 +00:00
|
|
|
|
2015-04-08 21:49:00 +00:00
|
|
|
fsLayers is a list of filesystem layer blob sums contained in this image.
|
2016-04-12 23:14:33 +00:00
|
|
|
|
2015-04-08 21:49:00 +00:00
|
|
|
An fsLayer is a struct consisting of the following fields
|
|
|
|
- **`blobSum`** *digest.Digest*
|
2016-04-12 23:14:33 +00:00
|
|
|
|
|
|
|
blobSum is the digest of the referenced filesystem image layer. A
|
2015-12-16 01:18:13 +00:00
|
|
|
digest must be a sha256 hash.
|
2016-04-12 23:14:33 +00:00
|
|
|
|
|
|
|
|
2015-04-08 21:49:00 +00:00
|
|
|
- **`history`** *array*
|
2016-04-12 23:14:33 +00:00
|
|
|
|
|
|
|
history is a list of unstructured historical data for v1 compatibility. It
|
2015-09-19 09:44:23 +00:00
|
|
|
contains ID of the image layer and ID of the layer's parent layers.
|
2016-04-12 23:14:33 +00:00
|
|
|
|
2015-04-08 21:49:00 +00:00
|
|
|
history is a struct consisting of the following fields
|
|
|
|
- **`v1Compatibility`** string
|
2016-04-12 23:14:33 +00:00
|
|
|
|
|
|
|
V1Compatibility is the raw V1 compatibility information. This will
|
2015-04-08 21:49:00 +00:00
|
|
|
contain the JSON object describing the V1 of this image.
|
2016-04-12 23:14:33 +00:00
|
|
|
|
2015-04-08 21:49:00 +00:00
|
|
|
- **`schemaVersion`** *int*
|
2016-04-12 23:14:33 +00:00
|
|
|
|
2015-04-08 21:49:00 +00:00
|
|
|
SchemaVersion is the image manifest schema that this image follows.
|
2016-04-12 23:14:33 +00:00
|
|
|
|
|
|
|
>**Note**:the length of `history` must be equal to the length of `fsLayers` and
|
2015-09-19 09:44:23 +00:00
|
|
|
>entries in each are correlated by index.
|
|
|
|
|
2015-04-08 21:49:00 +00:00
|
|
|
## Signed Manifests
|
|
|
|
|
2016-04-12 23:14:33 +00:00
|
|
|
Signed manifests provides an envelope for a signed image manifest. A signed
|
|
|
|
manifest consists of an image manifest along with an additional field
|
2015-04-08 21:49:00 +00:00
|
|
|
containing the signature of the manifest.
|
|
|
|
|
|
|
|
The docker client can verify signed manifests and displays a message to the user.
|
|
|
|
|
|
|
|
### Signing Manifests
|
|
|
|
|
|
|
|
Image manifests can be signed in two different ways: with a *libtrust* private
|
2016-04-12 23:14:33 +00:00
|
|
|
key or an x509 certificate chain. When signing with an x509 certificate chain,
|
|
|
|
the public key of the first element in the chain must be the public key
|
2015-04-08 21:49:00 +00:00
|
|
|
corresponding with the sign key.
|
2016-04-12 23:14:33 +00:00
|
|
|
|
2015-04-08 21:49:00 +00:00
|
|
|
### Signed Manifest Field Description
|
|
|
|
|
2015-09-23 02:40:13 +00:00
|
|
|
Signed manifests include an image manifest and a list of signatures generated
|
2015-04-08 21:49:00 +00:00
|
|
|
by *libtrust*. A signature consists of the following fields:
|
|
|
|
|
|
|
|
|
|
|
|
- **`header`** *[JOSE](http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-31#section-2)*
|
2016-04-12 23:14:33 +00:00
|
|
|
|
2015-04-08 21:49:00 +00:00
|
|
|
A [JSON Web Signature](http://self-issued.info/docs/draft-ietf-jose-json-web-signature.html)
|
|
|
|
|
|
|
|
- **`signature`** *string*
|
|
|
|
|
|
|
|
A signature for the image manifest, signed by a *libtrust* private key
|
|
|
|
|
|
|
|
- **`protected`** *string*
|
2016-04-12 23:14:33 +00:00
|
|
|
|
2015-04-08 21:49:00 +00:00
|
|
|
The signed protected header
|
2016-04-12 23:14:33 +00:00
|
|
|
|
2015-04-08 21:49:00 +00:00
|
|
|
## Example Manifest
|
|
|
|
|
|
|
|
*Example showing the official 'hello-world' image manifest.*
|
|
|
|
|
|
|
|
```
|
|
|
|
{
|
|
|
|
"name": "hello-world",
|
|
|
|
"tag": "latest",
|
|
|
|
"architecture": "amd64",
|
|
|
|
"fsLayers": [
|
|
|
|
{
|
|
|
|
"blobSum": "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"blobSum": "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"blobSum": "sha256:cc8567d70002e957612902a8e985ea129d831ebe04057d88fb644857caa45d11"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"blobSum": "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"history": [
|
|
|
|
{
|
|
|
|
"v1Compatibility": "{\"id\":\"e45a5af57b00862e5ef5782a9925979a02ba2b12dff832fd0991335f4a11e5c5\",\"parent\":\"31cbccb51277105ba3ae35ce33c22b69c9e3f1002e76e4c736a2e8ebff9d7b5d\",\"created\":\"2014-12-31T22:57:59.178729048Z\",\"container\":\"27b45f8fb11795b52e9605b686159729b0d9ca92f76d40fb4f05a62e19c46b4f\",\"container_config\":{\"Hostname\":\"8ce6509d66e2\",\"Domainname\":\"\",\"User\":\"\",\"Memory\":0,\"MemorySwap\":0,\"CpuShares\":0,\"Cpuset\":\"\",\"AttachStdin\":false,\"AttachStdout\":false,\"AttachStderr\":false,\"PortSpecs\":null,\"ExposedPorts\":null,\"Tty\":false,\"OpenStdin\":false,\"StdinOnce\":false,\"Env\":[\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"],\"Cmd\":[\"/bin/sh\",\"-c\",\"#(nop) CMD [/hello]\"],\"Image\":\"31cbccb51277105ba3ae35ce33c22b69c9e3f1002e76e4c736a2e8ebff9d7b5d\",\"Volumes\":null,\"WorkingDir\":\"\",\"Entrypoint\":null,\"NetworkDisabled\":false,\"MacAddress\":\"\",\"OnBuild\":[],\"SecurityOpt\":null,\"Labels\":null},\"docker_version\":\"1.4.1\",\"config\":{\"Hostname\":\"8ce6509d66e2\",\"Domainname\":\"\",\"User\":\"\",\"Memory\":0,\"MemorySwap\":0,\"CpuShares\":0,\"Cpuset\":\"\",\"AttachStdin\":false,\"AttachStdout\":false,\"AttachStderr\":false,\"PortSpecs\":null,\"ExposedPorts\":null,\"Tty\":false,\"OpenStdin\":false,\"StdinOnce\":false,\"Env\":[\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"],\"Cmd\":[\"/hello\"],\"Image\":\"31cbccb51277105ba3ae35ce33c22b69c9e3f1002e76e4c736a2e8ebff9d7b5d\",\"Volumes\":null,\"WorkingDir\":\"\",\"Entrypoint\":null,\"NetworkDisabled\":false,\"MacAddress\":\"\",\"OnBuild\":[],\"SecurityOpt\":null,\"Labels\":null},\"architecture\":\"amd64\",\"os\":\"linux\",\"Size\":0}\n"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"v1Compatibility": "{\"id\":\"e45a5af57b00862e5ef5782a9925979a02ba2b12dff832fd0991335f4a11e5c5\",\"parent\":\"31cbccb51277105ba3ae35ce33c22b69c9e3f1002e76e4c736a2e8ebff9d7b5d\",\"created\":\"2014-12-31T22:57:59.178729048Z\",\"container\":\"27b45f8fb11795b52e9605b686159729b0d9ca92f76d40fb4f05a62e19c46b4f\",\"container_config\":{\"Hostname\":\"8ce6509d66e2\",\"Domainname\":\"\",\"User\":\"\",\"Memory\":0,\"MemorySwap\":0,\"CpuShares\":0,\"Cpuset\":\"\",\"AttachStdin\":false,\"AttachStdout\":false,\"AttachStderr\":false,\"PortSpecs\":null,\"ExposedPorts\":null,\"Tty\":false,\"OpenStdin\":false,\"StdinOnce\":false,\"Env\":[\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"],\"Cmd\":[\"/bin/sh\",\"-c\",\"#(nop) CMD [/hello]\"],\"Image\":\"31cbccb51277105ba3ae35ce33c22b69c9e3f1002e76e4c736a2e8ebff9d7b5d\",\"Volumes\":null,\"WorkingDir\":\"\",\"Entrypoint\":null,\"NetworkDisabled\":false,\"MacAddress\":\"\",\"OnBuild\":[],\"SecurityOpt\":null,\"Labels\":null},\"docker_version\":\"1.4.1\",\"config\":{\"Hostname\":\"8ce6509d66e2\",\"Domainname\":\"\",\"User\":\"\",\"Memory\":0,\"MemorySwap\":0,\"CpuShares\":0,\"Cpuset\":\"\",\"AttachStdin\":false,\"AttachStdout\":false,\"AttachStderr\":false,\"PortSpecs\":null,\"ExposedPorts\":null,\"Tty\":false,\"OpenStdin\":false,\"StdinOnce\":false,\"Env\":[\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"],\"Cmd\":[\"/hello\"],\"Image\":\"31cbccb51277105ba3ae35ce33c22b69c9e3f1002e76e4c736a2e8ebff9d7b5d\",\"Volumes\":null,\"WorkingDir\":\"\",\"Entrypoint\":null,\"NetworkDisabled\":false,\"MacAddress\":\"\",\"OnBuild\":[],\"SecurityOpt\":null,\"Labels\":null},\"architecture\":\"amd64\",\"os\":\"linux\",\"Size\":0}\n"
|
2017-04-14 14:59:40 +00:00
|
|
|
}
|
2015-04-08 21:49:00 +00:00
|
|
|
],
|
|
|
|
"schemaVersion": 1,
|
|
|
|
"signatures": [
|
|
|
|
{
|
|
|
|
"header": {
|
|
|
|
"jwk": {
|
|
|
|
"crv": "P-256",
|
|
|
|
"kid": "OD6I:6DRK:JXEJ:KBM4:255X:NSAA:MUSF:E4VM:ZI6W:CUN2:L4Z6:LSF4",
|
|
|
|
"kty": "EC",
|
|
|
|
"x": "3gAwX48IQ5oaYQAYSxor6rYYc_6yjuLCjtQ9LUakg4A",
|
|
|
|
"y": "t72ge6kIA1XOjqjVoEOiPPAURltJFBMGDSQvEGVB010"
|
|
|
|
},
|
|
|
|
"alg": "ES256"
|
|
|
|
},
|
|
|
|
"signature": "XREm0L8WNn27Ga_iE_vRnTxVMhhYY0Zst_FfkKopg6gWSoTOZTuW4rK0fg_IqnKkEKlbD83tD46LKEGi5aIVFg",
|
|
|
|
"protected": "eyJmb3JtYXRMZW5ndGgiOjY2MjgsImZvcm1hdFRhaWwiOiJDbjAiLCJ0aW1lIjoiMjAxNS0wNC0wOFQxODo1Mjo1OVoifQ"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2016-04-12 23:14:33 +00:00
|
|
|
|
2015-04-08 21:49:00 +00:00
|
|
|
```
|