stages/oci-archive: define ostree annotations

Define a set of pre-defined ostree related annotations that can
and should be used to indicate that a container image contains
an OSTree commit. This can be used by other tools to inspect and
extract the commit more easily.
This commit is contained in:
Christian Kellner 2021-05-12 18:45:15 +00:00
parent 65d831b2cb
commit 722211df00

View file

@ -20,6 +20,14 @@ Manifest annotations can be included via the `annotation` options. Any
`key`, `value` pair is allowed, with the exception of the pre-defined
`org.osbuild` and `org.opencontainer` namespaces.
Specific annotations can be used to indicate that a container contains
an OSTree commit via the following:
- `org.osbuild.layer`: The layer containing the OSTree repository
- `org.osbuild.repo`: Path inside the container to the repository
- `org.osbuild.ref`: OSTree reference of the commit inside the repo
The `org.osbuild.layer` value can either bey a index (starting at 0),
or a digest in the form of <algorithm>:<checksum>.
The final resulting tarball, aka a "orci-archive", can be imported via
podman[3] with `podman pull oci-archive:<archive>`.
@ -103,6 +111,20 @@ SCHEMA_2 = r"""
},
"annotations": {
"type": "object",
"properties": {
"org.osbuild.ostree.layer": {
"description": "The layer that contains the OSTree repository",
"type": "string"
},
"org.osbuild.ostree.repo": {
"description": "Path to the OSTree repository inside the layer",
"type": "string"
},
"org.osbuild.ostree.ref": {
"description": "Reference of the OSTree commit in the repository",
"type": "string"
}
},
"additionalProperties": false,
"patternProperties": {
"^(?!org.osbuild|org.opencontainer).+": {