Skip to content

Commit 8e42a01

Browse files
authored
Merge pull request opencontainers#822 from imjasonh/patch-1
Add standard base image annotations
2 parents fe0a249 + ebb32fd commit 8e42a01

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

annotations.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ This specification defines the following annotation keys, intended for but not l
4040
```
4141
* **org.opencontainers.image.title** Human-readable title of the image (string)
4242
* **org.opencontainers.image.description** Human-readable description of the software packaged in the image (string)
43+
* **org.opencontainers.image.base.digest** [Digest](descriptor.md#digests) of the image this image is based on (string)
44+
* This SHOULD be the immediate image sharing zero-indexed layers with the image, such as from a Dockerfile `FROM` statement.
45+
* This SHOULD NOT reference any other images used to generate the contents of the image (e.g., multi-stage Dockerfile builds).
46+
* **org.opencontainers.image.base.name** Image reference of the image this image is based on (string)
47+
* This SHOULD be image references in the format defined by [distribution/distribution](https://github.com/distribution/distribution/blob/d0deff9cd6c2b8c82c6f3d1c713af51df099d07b/reference/reference.go).
48+
* This SHOULD be a fully qualified reference name, without any assumed default registry. (e.g., `registry.example.com/my-org/my-image:tag` instead of `my-org/my-image:tag`).
49+
* This SHOULD be the immediate image sharing zero-indexed layers with the image, such as from a Dockerfile `FROM` statement.
50+
* This SHOULD NOT reference any other images used to generate the contents of the image (e.g., multi-stage Dockerfile builds).
51+
* If the `image.base.name` annotation is specified, the `image.base.digest` annotation SHOULD be the digest of the manifest referenced by the `image.ref.name` annotation.
4352
4453
## Back-compatibility with Label Schema
4554

specs-go/v1/annotations.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,10 @@ const (
5353

5454
// AnnotationDescription is the annotation key for the human-readable description of the software packaged in the image.
5555
AnnotationDescription = "org.opencontainers.image.description"
56+
57+
// AnnotationBaseImageDigest is the annotation key for the digest of the image's base image.
58+
AnnotationBaseImageDigest = "org.opencontainers.image.base.digest"
59+
60+
// AnnotationBaseImageName is the annotation key for the image reference of the image's base image.
61+
AnnotationBaseImageName = "org.opencontainers.image.base.name"
5662
)

0 commit comments

Comments
 (0)