From 8f3f59e46f5872c02885f7e31a54b613e9f3091e Mon Sep 17 00:00:00 2001 From: Doug Davis Date: Sun, 26 Jun 2016 12:49:13 -0700 Subject: [PATCH] Add text about extensions Mimic https://github.com/opencontainers/image-spec/pull/164 and they should be kept in-sync Signed-off-by: Doug Davis --- config.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/config.md b/config.md index 8d2d746d3..127dd01ec 100644 --- a/config.md +++ b/config.md @@ -324,15 +324,24 @@ The semantics are the same as `Path`, `Args` and `Env` in [golang Cmd](https://g **`annotations`** (object, optional) contains arbitrary metadata for the container. This information MAY be structured or unstructured. -Annotations are key-value maps. +Annotations MUST be key-value maps where both the key and value MUST be strings. +While the value MUST be present, it MAY be an empty string. +Keys MUST be unique, and best practice is to namespace the keys. +Keys using the `org.opencontainers` namespace are reserved and MUST NOT be used. +If there are no annotations then this property MAY either be absent or an empty map. +Implementations that are reading/processing this configuration file MUST NOT generate an error if they encounter an unknown annotation key. ```json "annotations": { - "key1" : "value1", - "key2" : "value2" + "com.example/gpu-cores" : "2" } ``` +## Extensibility +The `annotations` property MAY be used as an extensibility point to include additional information that is not defined as part of this specification. +Implementations that are reading/processing this configuration file MUST NOT generate an error if they encounter an unkown property. +Instead they MUST ignore unknown properties. + ## Configuration Schema Example Here is a full example `config.json` for reference.