ContainerApplicationGenericLabels icon indicating copy to clipboard operation
ContainerApplicationGenericLabels copied to clipboard

Image name that includes string '--' not acceptable in docker 1.8+

Open aweiteka opened this issue 10 years ago • 3 comments

Per vendor/redhat/names.md we accept '--' in the build image name. This causes a failure in docker v1.8+.

$ rpm -q docker
docker-1.8.1-3.git32b8b25.fc22.x86_64
$ cat /etc/redhat-release 
Fedora release 22 (Twenty Two)
$ sudo docker build -t test/atomicapp--name .
repository name component must match "[a-z0-9]+(?:[._-][a-z0-9]+)*"
$ sudo docker build -t test/atomicapp-name .
Sending build context to Docker daemon  2.08 MB
Step 0 : FROM centos:centos7
...

aweiteka avatar Sep 17 '15 17:09 aweiteka

To reproduce, attempt to create a new repository on hub.docker.com named "some--thing".

thomasmckay avatar Sep 17 '15 17:09 thomasmckay

https://forums.docker.com/t/docker-hub-repository-name-does-not-except-two-dashes/3434

thomasmckay avatar Sep 17 '15 23:09 thomasmckay

Looks like just a bug in the regex that checks.

Changing
[a-z0-9]+(?:[._-][a-z0-9]+)*
to
[a-z0-9]+(?:[._-]+[a-z0-9]+)*

Might fix the problem. Unless docker really wants to force it to be just a single separator field.

rhatdan avatar Sep 18 '15 13:09 rhatdan