Docker tags are not allowed to have the the + (build metadata separator) character, meaning they can't hold the full range of semver compatible version strings. See §10 of the semver v2.0.0 spec: http://semver.org
When I try to use a plus character, this happens...
$ docker tag some-image blah:0.0.0+1
Error response from daemon: Illegal tag name (0.0.0+1): only [A-Za-z0-9_.-] are allowed ('.' and '-' are NOT allowed in the initial), minimum 1, maximum 128 in length
You can see the code which defines an allowed tag name at https://github.com/docker/distribution/blob/master/reference/regexp.go#L25
This is a bit frustrating, as I want to use semver in my tags. Is there any specific reason why the plus character is disallowed in the tag? If not, can we add support for it? I'd be happy to send a PR...
$ docker version
Client:
Version: 1.8.2
API version: 1.20
Go version: go1.4.2
Git commit: 0a8c2e3
Built: Thu Sep 10 19:10:10 UTC 2015
OS/Arch: darwin/amd64
Server:
Version: 1.8.2
API version: 1.20
Go version: go1.4.2
Git commit: 0a8c2e3
Built: Thu Sep 10 19:10:10 UTC 2015
OS/Arch: linux/amd64
$ docker info
Containers: 37
Images: 180
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 254
Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.0.9-boot2docker
Operating System: Boot2Docker 1.8.2 (TCL 6.4); master : aba6192 - Thu Sep 10 20:58:17 UTC 2015
CPUs: 1
Total Memory: 996.2 MiB
Name: dev
ID: J5RR:6EEH:HER7:UBEW:33KA:MZTD:IVV7:GRQH:XFZR:WSIV:EWA2:RZIK
Debug mode (server): true
File Descriptors: 11
Goroutines: 17
System Time: 2015-11-23T15:58:59.917311419Z
EventsListeners: 0
Init SHA1:
Init Path: /usr/local/bin/docker
Docker Root Dir: /mnt/sda1/var/lib/docker
Labels:
provider=virtualbox
$ uname -a
Darwin xxx 15.0.0 Darwin Kernel Version 15.0.0: Sat Sep 19 15:53:46 PDT 2015; root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64
NOTE: This issue replaces moby/moby#18168 since the definition of a tag is contained in this repo at https://github.com/docker/distribution/blob/master/reference/regexp.go#L25
Docker tags are not allowed to have the the
+(build metadata separator) character, meaning they can't hold the full range of semver compatible version strings. See §10 of the semver v2.0.0 spec: http://semver.orgWhen I try to use a plus character, this happens...
You can see the code which defines an allowed tag name at https://github.com/docker/distribution/blob/master/reference/regexp.go#L25
This is a bit frustrating, as I want to use semver in my tags. Is there any specific reason why the plus character is disallowed in the tag? If not, can we add support for it? I'd be happy to send a PR...
NOTE: This issue replaces moby/moby#18168 since the definition of a tag is contained in this repo at https://github.com/docker/distribution/blob/master/reference/regexp.go#L25