Search code examples
dockerartifactory

What Unsupported docker v2 repository request for 'artifactory' means


My docker client/server version is:

$ docker version
Client:
Version:           18.09.0
API version:       1.39
Go version:        go1.10.4
Git commit:        4d60db4
Built:             Wed Nov  7 00:49:01 2018
OS/Arch:           linux/amd64
Experimental:      false

Server: Docker Engine - Community
Engine:
Version:          18.09.0
API version:      1.39 (minimum version 1.12)
Go version:       go1.10.4
Git commit:       4d60db4
Built:            Wed Nov  7 00:16:44 2018
OS/Arch:          linux/amd64
Experimental:     false

Would like to use artifactory to host dockers. When running

docker login 

getting:

Unsupported docker v2 repository request for 'artifactory'

What does this error mean?

What V2 part is artifactory complaining on?


Solution

  • Ensure you have the following rewrite in your reverse proxy.

    Nginx

      rewrite ^/(v1|v2)/(.*) /api/docker/$repo/$1/$2;
    

    Apache

        RewriteCond "%{REQUEST_URI}" "^/(v1|v2)/"
    

    This requirement is currently missing from the jfrog documentation, however it is documented if you go into HTTP settings and let artifactory generate the proxy config for you.

    enter image description here