Skip to content

Commit 873b9b6

Browse files
author
Doug Davis
committed
Add some text about extensions
Signed-off-by: Doug Davis <[email protected]>
1 parent 5553ed5 commit 873b9b6

File tree

1 file changed

+38
-22
lines changed

1 file changed

+38
-22
lines changed

manifest.md

Lines changed: 38 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,22 @@ A client will distinguish a manifest list from an image manifest based on the Co
6161

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

64-
- **`annotations`** *string-string hashmap*
64+
- **`annotations`** *string-string map*
6565

6666
This OPTIONAL property contains arbitrary metadata for the manifest list.
67-
Annotations is a key-value, unordered hashmap.
68-
Keys are unique, and best practice is to namespace the keys.
69-
Common annotation keys include:
70-
* **created** date on which the image was built (string, timestamps type)
71-
* **authors** contact details of the people or organization responsible for the image (freeform string)
72-
* **homepage** URL to find more information on the image (string, must be a URL with scheme HTTP or HTTPS)
73-
* **documentation** URL to get documentation on the image (string, must be a URL with scheme HTTP or HTTPS)
67+
Annotations MUST be a key-value map where both the key and value MUST be strings.
68+
While the value MUST be present, it MAY be an empty string.
69+
Keys MUST be unique within this map, and best practice is to namespace the keys.
70+
Keys SHOULD be named using a reverse domain notation - e.g. `com.example.myKey`.
71+
Keys using the `org.opencontainers` namespace are reserved and MUST NOT be used by other specifications.
72+
If there are no annotations then this property MUST either be absent or be an empty map.
73+
Implementations that are reading/processing manifest lists MUST NOT generate an error if they encounter an unknown annotation key.
7474

75+
See [Pre-Defined Annotation Keys](#pre-defined-annotation-keys).
76+
77+
### Extensibility
78+
Implementations that are reading/processing manifest lists MUST NOT generate an error if they encounter an unknown property.
79+
Instead they MUST ignore unknown properties.
7580

7681
## Example Manifest List
7782

@@ -104,8 +109,8 @@ A client will distinguish a manifest list from an image manifest based on the Co
104109
}
105110
],
106111
"annotations": {
107-
"key1": "value1",
108-
"key2": "value2"
112+
"com.example.key1": "value1",
113+
"com.example.key2": "value2"
109114
}
110115
}
111116
```
@@ -139,18 +144,22 @@ Unlike the [Manifest List](#manifest-list), which contains information about a s
139144
Subsequent layers MUST then follow in the order in which they are to be layered on top of each other.
140145
The algorithm to create the final unpacked filesystem layout MUST be to first unpack the layer at index 0, then index 1, and so on.
141146

142-
- **`annotations`** *hashmap*
147+
- **`annotations`** *string-string map*
143148

144-
This OPTIONAL property contains arbitrary metadata for the manifest list.
145-
Annotations is a key-value, unordered hashmap.
146-
Keys MUST be unique within the hashmap, and best practice is to namespace the keys.
147-
Common annotation keys include:
148-
* **created** date on which the image was built (string, timestamps type)
149-
* **authors** contact details of the people or organization responsible for the image (freeform string)
150-
* **homepage** URL to find more information on the image (string, must be a URL with scheme HTTP or HTTPS)
151-
* **documentation** URL to get documentation on the image (string, must be a URL with scheme HTTP or HTTPS)
152-
* **source** URL to get the source code for the binary files in the image (string, must be a URL with scheme HTTP or HTTPS)
149+
This OPTIONAL property contains arbitrary metadata for the image manifest.
150+
Annotations MUST be a key-value map where both the key and value MUST be strings.
151+
While the value MUST be present, it MAY be an empty string.
152+
Keys MUST be unique within this map, and best practice is to namespace the keys.
153+
Keys SHOULD be named using a reverse domain notation - e.g. `com.example.myKey`.
154+
Keys using the `org.opencontainers` namespace are reserved and MUST NOT be used by other specifications.
155+
If there are no annotations then this property MUST either be absent or be an empty map.
156+
Implementations that are reading/processing the image manifest MUST NOT generate an error if they encounter an unknown annotation key.
153157

158+
See [Pre-Defined Annotation Keys](#pre-defined-annotation-keys).
159+
160+
### Extensibility
161+
Implementations that are reading/processing image manifests MUST NOT generate an error if they encounter an unknown property.
162+
Instead they MUST ignore unknown properties.
154163

155164
## Example Image Manifest
156165

@@ -182,8 +191,15 @@ Unlike the [Manifest List](#manifest-list), which contains information about a s
182191
}
183192
],
184193
"annotations": {
185-
"key1": "value1",
186-
"key2": "value2"
194+
"com.example.key1": "value1",
195+
"com.example.key2": "value2"
187196
}
188197
}
189198
```
199+
200+
# Pre-Defined Annotation Keys
201+
This specification defines the following annotation keys, which MAY be used by manifest list and image manifest authors:
202+
* **org.opencontainers.created** date on which the image was built (string, date-time as defined by [RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6)).
203+
* **org.opencontainers.authors** contact details of the people or organization responsible for the image (freeform string)
204+
* **org.opencontainers.homepage** URL to find more information on the image (string, must be a URL with scheme HTTP or HTTPS)
205+
* **org.opencontainers.documentation** URL to get documentation on the image (string, must be a URL with scheme HTTP or HTTPS)

0 commit comments

Comments
 (0)