Skip to content

Commit 7350d6c

Browse files
author
Doug Davis
committed
Add some text about extensions
Signed-off-by: Doug Davis <[email protected]>
1 parent 08ef0b1 commit 7350d6c

File tree

1 file changed

+39
-22
lines changed

1 file changed

+39
-22
lines changed

manifest.md

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

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

63-
- **`annotations`** *string-string hashmap*
63+
- **`annotations`** *string-string map*
6464

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

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

7580
## Example Manifest List
7681

@@ -103,8 +108,8 @@ A client will distinguish a manifest list from an image manifest based on the Co
103108
}
104109
],
105110
"annotations": {
106-
"key1": "value1",
107-
"key2": "value2"
111+
"com.example.key1": "value1",
112+
"com.example.key2": "value2"
108113
}
109114
}
110115
```
@@ -137,18 +142,22 @@ Unlike the [Manifest List](#manifest-list), which contains information about a s
137142
Subsequent layers MUST then follow in the order in which they are to be layered on top of each other.
138143
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.
139144

140-
- **`annotations`** *hashmap*
145+
- **`annotations`** *string-string map*
141146

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

158+
### Extensibility
159+
Implementations that are reading/processing image manifests MUST NOT generate an error if they encounter an unknown property.
160+
Instead they MUST ignore unknown properties.
152161

153162
## Example Image Manifest
154163

@@ -180,8 +189,16 @@ Unlike the [Manifest List](#manifest-list), which contains information about a s
180189
}
181190
],
182191
"annotations": {
183-
"key1": "value1",
184-
"key2": "value2"
192+
"com.example.key1": "value1",
193+
"com.example.key2": "value2"
185194
}
186195
}
187196
```
197+
198+
# Pre-Defined Annotation Keys
199+
This specification defines the following annotation keys, which MAY be used by manifest list and image manifest authors:
200+
* **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)).
201+
* **org.opencontainers.authors** contact details of the people or organization responsible for the image (freeform string)
202+
* **org.opencontainers.homepage** URL to find more information on the image (string, must be a URL with scheme HTTP or HTTPS)
203+
* **org.opencontainers.documentation** URL to get documentation on the image (string, must be a URL with scheme HTTP or HTTPS)
204+

0 commit comments

Comments
 (0)