Skip to content

Commit 5e528fb

Browse files
committed
config: add annotations
there are annotations in the manifest, but having the same path available for configuration specifc annotations seems logical as well. Signed-off-by: Vincent Batts <[email protected]>
1 parent 41f1d08 commit 5e528fb

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

config.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,18 @@ Since the [configuration JSON](#image-json) that gets hashed references hashes o
174174
This field is used to mark if the history item created a filesystem diff.
175175
It is set to true if this history item doesn't correspond to an actual layer in the rootfs section (for example, a command like ENV which results in no change to the filesystem).
176176

177+
- **annotations** *object*, OPTIONAL
178+
179+
contains arbitrary metadata for the container.
180+
This information MAY be structured or unstructured.
181+
Annotations MUST be a key-value map where both the key and value MUST be strings.
182+
While the value MUST be present, it MAY be an empty string.
183+
Keys MUST be unique within this map, and best practice is to namespace the keys.
184+
Keys SHOULD be named using a reverse domain notation - e.g. `com.example.myKey`.
185+
Keys using the `org.opencontainers` namespace are reserved and MUST NOT be used by subsequent specifications.
186+
If there are no annotations then this property MAY either be absent or an empty map.
187+
Implementations that are reading/processing this configuration file MUST NOT generate an error if they encounter an unknown annotation key.
188+
177189
Any extra fields in the Image JSON struct are considered implementation specific and should be ignored by any implementations which are unable to interpret them.
178190

179191
Whitespace is OPTIONAL and implementations MAY have compact JSON with no whitespace.
@@ -232,6 +244,11 @@ Here is an example image configuration JSON document:
232244
"created_by": "/bin/sh -c #(nop) CMD [\"sh\"]",
233245
"empty_layer": true
234246
}
235-
]
247+
],
248+
"annotations": {
249+
"com.example.project.git.url": "https://example.com/project.git",
250+
"com.example.project.git.commit": "45a939b2999782a3f005621a8d0f29aa387e1d6b",
251+
"com.example.package.openssl": "1.0.2j"
252+
}
236253
}
237254
```

0 commit comments

Comments
 (0)