How I can decide if docker tries to use v1 or v2 API for a registry? I try to use artifactory as a docker registry, but somehow I can’t connect. One of the many question about it if docker login uses the right version of the API. I have the latest docker so I assume it will use v2 by default, I’ve made a docker repository in artifactory with version v2, but when I try to login (docker login) I’ve got an error message what shows some “v1” in the URL… I am not sure if that is the issue, but anyway would be nice to know if docker tries to connect to a registry with v1 or v2.
I have a similar but different issue. When I try a docker login I find following entries in the log:
2020-03-16T15:21:15Z docker time=“2020-03-16T15:21:15.875664855Z” level=debug msg=“form data: {“password”:”*****",“serveraddress”:“https://index.docker.io/v1/",“username”:“muessemeierpx”}"
2020-03-16T15:21:15Z docker time=“2020-03-16T15:21:15.875801356Z” level=debug msg=“attempting v2 login to registry endpoint https://registry-1.docker.io/v2/”
2020-03-16T15:21:15Z docker time=“2020-03-16T15:21:15.892026537Z” level=info msg=“Error logging in to v2 endpoint, trying next endpoint: Get https://registry-1.docker.io/v2/: authenticationrequired”
2020-03-16T15:21:15Z docker time=“2020-03-16T15:21:15.892103837Z” level=debug msg=“FIXME: Got an API for which error does not match any expected type!!!: Get https://registry-1.docker.io/v2/: authenticationrequired” error_type=”*url.Error" module=api
2020-03-16T15:21:15Z docker time=“2020-03-16T15:21:15.892124937Z” level=error msg=“Handler for POST /v1.40/auth returned error: Get https://registry-1.docker.io/v2/: authenticationrequired”
2020-03-16T15:21:15Z docker time=“2020-03-16T15:21:15.892156637Z” level=debug msg=“FIXME: Got an API for which error does not match any expected type!!!: Get https://registry-1.docker.io/v2/: authenticationrequired” error_type="*url.Error" module=api
Seems to me the form is using the v1 version, but docker hub only supports the v2 version… any help?