Skip to content

Commit 68346ed

Browse files
authored
Merge pull request #1197 from cyphar/image-spec-annotations
config: add support for org.opencontainers.image annotations
2 parents 9923541 + fccfb09 commit 68346ed

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

config.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,21 @@ If there are no annotations then this property MAY either be absent or an empty
699699
Keys MUST be strings.
700700
Keys MUST NOT be an empty string.
701701
Keys SHOULD be named using a reverse domain notation - e.g. `com.example.myKey`.
702-
Keys using the `org.opencontainers` namespace are reserved and MUST NOT be used by subsequent specifications.
702+
703+
The `org.opencontainers` namespace for keys is reserved for use by this specification, annotations using keys in this namespace MUST be as described in this section.
704+
The following keys in the `org.opencontainers` namespaces MAY be used:
705+
| Key | Definition |
706+
| --------------------------------------- | -----------------------------------------------------------------------------------------------------------------------------------|
707+
| `org.opencontainers.image.os` | Indicates the operating system the container image was built to run on. The annotation value MUST have a valid value for the `os` property as defined in [the OCI image specification][oci-image-config-properties]. This annotation SHOULD only be used in accordance with the [OCI image specification's runtime conversion specification][oci-image-conversion]. |
708+
| `org.opencontainers.image.os.version` | Indicates the operating system version targeted by the container image. The annotation value MUST have a valid value for the `os.version` property as defined in [the OCI image specification][oci-image-config-properties]. This annotation SHOULD only be used in accordance with the [OCI image specification's runtime conversion specification][oci-image-conversion]. |
709+
| `org.opencontainers.image.os.features` | Indicates mandatory operating system features required by the container image. The annotation value MUST have a valid value for the `os.features` property as defined in [the OCI image specification][oci-image-config-properties]. This annotation SHOULD only be used in accordance with the [OCI image specification's runtime conversion specification][oci-image-conversion]. |
710+
| `org.opencontainers.image.architecture` | Indicates the architecture that binaries in the container image are built to run on. The annotation value MUST have a valid value for the `architecture` property as defined in [the OCI image specification][oci-image-config-properties]. This annotation SHOULD only be used in accordance with the [OCI image specification's runtime conversion specification][oci-image-conversion]. |
711+
| `org.opencontainers.image.variant` | Indicates the variant of the architecture that binaries in the container image are built to run on. The annotation value MUST have a valid value for the `variant` property as defined in [the OCI image specification][oci-image-config-properties]. This annotation SHOULD only be used in accordance with the [OCI image specification's runtime conversion specification][oci-image-conversion]. |
712+
| `org.opencontainers.image.author` | Indicates the author of the container image. The annotation value MUST have a valid value for the `author` property as defined in [the OCI image specification][oci-image-config-properties]. This annotation SHOULD only be used in accordance with the [OCI image specification's runtime conversion specification][oci-image-conversion]. |
713+
| `org.opencontainers.image.created` | Indicates the date and time when the container image was created. The annotation value MUST have a valid value for the `created` property as defined in [the OCIimage specification][oci-image-config-properties]. This annotation SHOULD only be used in accordance with the [OCI image specification's runtime conversion specification][oci-image-conversion]. |
714+
| `org.opencontainers.image.stopSignal` | Indicates signal that SHOULD be sent by the container runtimes to [kill the container](runtime.md#kill). The annotation value MUST have a valid value for the `config.StopSignal` property as defined in [the OCI image specification][oci-image-config-properties]. This annotation SHOULD only be used in accordance with the [OCI image specification's runtime conversion specification][oci-image-conversion]. |
715+
716+
All other keys in the `org.opencontainers` namespace not specified in this above table are reserved and MUST NOT be used by subsequent specifications.
703717
Runtimes MUST handle unknown annotation keys like any other [unknown property](#extensibility).
704718

705719
Values MUST be strings.
@@ -1129,6 +1143,8 @@ Here is a full example `config.json` for reference.
11291143
[ieee-1003.1-2008-xbd-c8.1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_01
11301144
[ieee-1003.1-2008-functions-exec]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html
11311145
[naming-a-volume]: https://aka.ms/nb3hqb
1146+
[oci-image-config-properties]: https://github.com/opencontainers/image-spec/blob/v1.1.0-rc2/config.md#properties
1147+
[oci-image-conversion]: https://github.com/opencontainers/image-spec/blob/v1.1.0-rc2/conversion.md
11321148

11331149
[capabilities.7]: http://man7.org/linux/man-pages/man7/capabilities.7.html
11341150
[mount.2]: http://man7.org/linux/man-pages/man2/mount.2.html

0 commit comments

Comments
 (0)