Skip to content

Commit 1ef6b5d

Browse files
committed
Add some restriction to "org.opencontainers.ref.name"
A common use case of `org.opencontainers.ref.name` is representing a `tag` for a container image. In docker, there is some restriction of the name see https://github.com/docker/docker/blob/master/vendor/github.com/docker/distribution/reference/regexp.go#L37. Without these restrictions, I'm afraid the tag of oci image is invalid for docker. These restrictions used to exist but removed in opencontainers#533. Signed-off-by: Lei Jitang <[email protected]>
1 parent b36dbc4 commit 1ef6b5d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

image-layout.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ The [image index](image-index.md) is a multi-descriptor entry point.
148148
This index provides an established path (`/index.json`) to have an entry point for an image-layout and to discover auxiliary descriptors.
149149

150150
No semantic restriction is given for the "org.opencontainers.ref.name" annotation of descriptors.
151+
The value of "org.opencontainers.ref.name" annotation is a string which MUST NOT include characters outside of the set of "A" to "Z", "a" to "z", "0" to "9", the hyphen `-`, the dot `.`, and the underscore `_`.
151152
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`.
152153
Future versions of the spec MAY use a different mediatype (i.e. a new versioned format).
153154
An encountered `mediaType` that is unknown SHOULD be safely ignored.

0 commit comments

Comments
 (0)