Skip to content

Commit 72622f5

Browse files
authored
Merge pull request #606 from stevvooe/namespace-image-annotations
spec: namespace annotations defined in image spec
2 parents 39825f9 + 8ec42b7 commit 72622f5

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

annotations.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@ Annotations MUST be a key-value map where both the key and value MUST be strings
99
While the value MUST be present, it MAY be an empty string.
1010
Keys MUST be unique within this map, and best practice is to namespace the keys.
1111
Keys SHOULD be named using a reverse domain notation - e.g. `com.example.myKey`.
12-
Keys using the `org.opencontainers` namespace are reserved and MUST NOT be used by other specifications and extensions.
12+
The prefix `org.opencontainers` is reserved for keys defined in Open Container Initiative (OCI) specifications and MUST NOT be used by other specifications and extensions.
13+
Keys using the `org.opencontainers.image` namespace are reserved for use in the OCI Image Specification and MUST NOT be used by other specifications and extensions, including other OCI specifications.
1314
If there are no annotations then this property MUST either be absent or be an empty map.
1415
Consumers MUST NOT generate an error if they encounter an unknown annotation key.
1516

1617
## Pre-Defined Annotation Keys
1718

1819
This specification defines the following annotation keys, intended for but not limited to [image index](image-index.md) and image [manifest](manifest.md) authors:
19-
* **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)).
20-
* **org.opencontainers.authors** contact details of the people or organization responsible for the image (freeform string)
21-
* **org.opencontainers.homepage** URL to find more information on the image (string, a URL with scheme HTTP or HTTPS)
22-
* **org.opencontainers.documentation** URL to get documentation on the image (string, a URL with scheme HTTP or HTTPS)
23-
* **org.opencontainers.source** URL to get source code for the binary files in the image (string, a URL with scheme HTTP or HTTPS)
24-
* **org.opencontainers.ref.name** Name of the reference (string)
20+
* **org.opencontainers.image.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)).
21+
* **org.opencontainers.image.authors** contact details of the people or organization responsible for the image (freeform string)
22+
* **org.opencontainers.image.homepage** URL to find more information on the image (string, a URL with scheme HTTP or HTTPS)
23+
* **org.opencontainers.image.documentation** URL to get documentation on the image (string, a URL with scheme HTTP or HTTPS)
24+
* **org.opencontainers.image.source** URL to get source code for the binary files in the image (string, a URL with scheme HTTP or HTTPS)
25+
* **org.opencontainers.image.ref.name** Name of the reference (string)

config.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ Note: Any OPTIONAL field MAY also be set to null, which is equivalent to being a
162162
Labels MUST be a key-value map where both the key and value MUST be strings.
163163
Keys MUST be unique within this map, and best practice is to namespace the keys.
164164
Keys SHOULD be named using a reverse domain notation - e.g. `com.example.myKey`.
165-
Keys using the `org.opencontainers` namespace are reserved and MUST NOT be used by subsequent specifications.
165+
Keys using the `org.opencontainers.image` namespace are reserved and MUST NOT be used by subsequent specifications.
166166
If there are no labels then this property MAY either be absent or an empty map.
167167
Implementations that are reading/processing this configuration file MUST NOT generate an error if they encounter an unknown labels key.
168168

image-layout.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,17 @@ The [image index](image-index.md) is a multi-descriptor entry point.
147147

148148
This index provides an established path (`/index.json`) to have an entry point for an image-layout and to discover auxiliary descriptors.
149149

150-
No semantic restriction is given for the "org.opencontainers.ref.name" annotation of descriptors.
150+
No semantic restriction is given for the "org.opencontainers.image.ref.name" annotation of descriptors.
151151
In general the `mediaType` of each [descriptor][descriptors] object in the `manifests` field will be either `application/vnd.oci.image.index.v1+json` or `application/vnd.oci.image.manifest.v1+json`.
152152
Future versions of the spec MAY use a different mediatype (i.e. a new versioned format).
153153
An encountered `mediaType` that is unknown SHOULD be safely ignored.
154154

155155

156156
**Implementor's Note:**
157-
A common use case of descriptors with a "org.opencontainers.ref.name" annotation is representing a "tag" for a container image.
157+
A common use case of descriptors with a "org.opencontainers.image.ref.name" annotation is representing a "tag" for a container image.
158158
For example, an image may have a tag for different versions or builds of the software.
159159
In the wild you often see "tags" like "v1.0.0-vendor.0", "2.0.0-debug", etc.
160-
Those tags will often be represented in an image-layout repository with matching "org.opencontainers.ref.name" annotations like "v1.0.0-vendor.0", "2.0.0-debug", etc.
160+
Those tags will often be represented in an image-layout repository with matching "org.opencontainers.image.ref.name" annotations like "v1.0.0-vendor.0", "2.0.0-debug", etc.
161161

162162

163163
### Index Example
@@ -171,7 +171,7 @@ Those tags will often be represented in an image-layout repository with matching
171171
"size": 7143,
172172
"digest": "sha256:0228f90e926ba6b96e4f39cf294b2586d38fbb5a1e385c05cd1ee40ea54fe7fd",
173173
"annotations": {
174-
"org.opencontainers.ref.name": "stable-release"
174+
"org.opencontainers.image.ref.name": "stable-release"
175175
}
176176
},
177177
{
@@ -183,7 +183,7 @@ Those tags will often be represented in an image-layout repository with matching
183183
"os": "linux"
184184
},
185185
"annotations": {
186-
"org.opencontainers.ref.name": "v1.0"
186+
"org.opencontainers.image.ref.name": "v1.0"
187187
}
188188
},
189189
{

0 commit comments

Comments
 (0)