Skip to content

Commit

Permalink
annotations: restrict character set of ref.name values
Browse files Browse the repository at this point in the history
URI are standard enough, though % opens it a bit too much.
After much discussion we're going to keep it as close to the docker tag
as possible but with +, @ and /
reference: #671 (comment)

And rather than making up our own mock grammar, lean on more formal
EBNF.

Fixes #599

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
  • Loading branch information
vbatts committed Jun 1, 2017
1 parent 47238a2 commit 5366d1f
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,25 @@ This specification defines the following annotation keys, intended for but not l
* **org.opencontainers.image.revision** Source control revision identifier for the packaged software.
* **org.opencontainers.image.vendor** Name of the distributing entity, organization or individual.
* **org.opencontainers.image.licenses** License(s) under which contained software is distributed as an [SPDX License Expression][spdx-license-expression].
* **org.opencontainers.image.ref.name** Name of the reference for a target (string). SHOULD only be considered valid when on descriptors on `index.json` within [image layout](image-layout.md).
* **org.opencontainers.image.ref.name** Name of the reference for a target (string).
* SHOULD only be considered valid when on descriptors on `index.json` within [image layout](image-layout.md).
* Character set of the value SHOULD conform to alphanum of `A-Za-z0-9` and separator set of `-._:@/+`
* An EBNF grammar like:
```EBNF
letter = "A" | "B" | "C" | "D" | "E" | "F" | "G"
| "H" | "I" | "J" | "K" | "L" | "M" | "N"
| "O" | "P" | "Q" | "R" | "S" | "T" | "U"
| "V" | "W" | "X" | "Y" | "Z" | "a" | "b"
| "c" | "d" | "e" | "f" | "g" | "h" | "i"
| "j" | "k" | "l" | "m" | "n" | "o" | "p"
| "q" | "r" | "s" | "t" | "u" | "v" | "w"
| "x" | "y" | "z" ;
digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
alphanum = letter | digit, { letter | digit } ;
separator = "-" | "." | "_" | ":" | "@" | "+" | "--" ;
component = alphanum, { separator | alphanum, alphanum } ;
ref = component, { "/", component } ;
```
* **org.opencontainers.image.title** Human-readable title of the image (string)
* **org.opencontainers.image.description** Human-readable description of the software packaged in the image (string)

Expand Down

0 comments on commit 5366d1f

Please sign in to comment.