Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manifest: add annotations #44

Merged
merged 1 commit into from
Apr 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 34 additions & 2 deletions manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ A client will distinguish a manifest list from an image manifest based on the Co

This OPTIONAL property specifies an array of strings, each specifying a mandatory CPU feature (for example `sse4` or `aes`).

- **`annotations`** *string-string hashmap*

This OPTIONAL property contains arbitrary metadata for the manifest list.
Annotations is a key-value, unordered hashmap.
Keys are unique, and best practice is to namespace the keys.
Common annotation keys include:
* **created** date on which the image was built (string, timestamps type)
* **authors** contact details of the people or organization responsible for the image (freeform string)
* **homepage** URL to find more information on the image (string, must be a URL with scheme HTTP or HTTPS)
* **documentation** URL to get documentation on the image (string, must be a URL with scheme HTTP or HTTPS)


## Example Manifest List

*Example showing a simple manifest list pointing to image manifests for two platforms:*
Expand Down Expand Up @@ -110,7 +122,11 @@ A client will distinguish a manifest list from an image manifest based on the Co
]
}
}
]
],
"annotations": {
"key1": "value1",
"key2": "value2",
}
}
```

Expand Down Expand Up @@ -174,6 +190,18 @@ The image manifest provides a configuration and a set of layers for a container

The digest of the content, as defined by the [Registry V2 HTTP API Specificiation](https://docs.docker.com/registry/spec/api/#digest-parameter).

- **`annotations`** *hashmap*

This OPTIONAL property contains arbitrary metadata for the manifest list.
Annotations is a key-value, unordered hashmap.
Keys are unique, and best practice is to namespace the keys.
Common annotation keys include:
* **created** date on which the image was built (string, timestamps type)
* **authors** contact details of the people or organization responsible for the image (freeform string)
* **homepage** URL to find more information on the image (string, must be a URL with scheme HTTP or HTTPS)
* **documentation** URL to get documentation on the image (string, must be a URL with scheme HTTP or HTTPS)


## Example Image Manifest

*Example showing an image manifest:*
Expand Down Expand Up @@ -202,7 +230,11 @@ The image manifest provides a configuration and a set of layers for a container
"size": 73109,
"digest": "sha256:ec4b8955958665577945c89419d1af06b5f7636b4ac3da7f12184802ad867736"
}
]
],
"annotations": {
"key1": "value1",
"key2": "value2",
}
}
```

Expand Down
11 changes: 11 additions & 0 deletions schema/defs-image.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@
}
}
}
},
"annotations": {
"id": "https://opencontainers.org/schema/image/annotations",
"oneOf": [
{
"$ref": "defs.json#/definitions/mapStringString"
},
{
"type": "null"
}
]
}
}
}
4 changes: 4 additions & 0 deletions schema/image-manifest-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
"items": {
"$ref": "defs-image.json#/definitions/descriptor"
}
},
"annotations": {
"id": "https://opencontainers.org/schema/image/manifest-list/annotations",
"$ref": "defs-image.json#/definitions/annotations"
}
},
"required": [
Expand Down
4 changes: 4 additions & 0 deletions schema/manifest-list-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
"items": {
"$ref": "defs-image.json#/definitions/manifestDescriptor"
}
},
"annotations": {
"id": "https://opencontainers.org/schema/image/manifest-list/annotations",
"$ref": "defs-image.json#/definitions/annotations"
}
},
"required": [
Expand Down