hub-feedback
hub-feedback copied to clipboard
Manifest endpoint https://docker.io/v2/francium25/base/manifests/latest redirects to 404
Accessing
https://docker.io/v2/francium25/base/manifests/latest
returns 301 to redirect to
https://www.docker.com/v2/francium25/base/manifests/latest
which gives a 404 HTML page. Should it direct to, e.g.,
https://registry.hub.docker.com/v2/francium25/base/manifests/latest
?
So, it causes a failure when a user specifies an image reference in the form of docker.io/repository/image. (https://github.com/GoogleContainerTools/jib/issues/1549) Detailed HTTP requests and responses:
Mar 11, 2019 5:27:26 PM com.google.api.client.http.HttpRequest execute
CONFIG: -------------- REQUEST --------------
GET https://docker.io/v2/francium25/base/manifests/latest
Accept: application/vnd.oci.image.manifest.v1+json,application/vnd.docker.distribution.manifest.v2+json,application/vnd.docker.distribution.manifest.v1+json
Accept-Encoding: gzip
User-Agent: jib 1.0.0 jib-maven-plugin Google-HTTP-Java-Client/1.23.0 (gzip)
Mar 11, 2019 5:27:26 PM com.google.api.client.http.HttpRequest execute
CONFIG: curl -v --compressed -H 'Accept: application/vnd.oci.image.manifest.v1+json,application/vnd.docker.distribution.manifest.v2+json,application/vnd.docker.distribution.manifest.v1+json' -H 'Accept-Encoding: gzip' -H 'User-Agent: jib 1.0.0 jib-maven-plugin Google-HTTP-Java-Client/1.23.0 (gzip)' -- 'https://docker.io/v2/francium25/base/manifests/latest'
Mar 11, 2019 5:27:26 PM com.google.api.client.http.HttpResponse <init>
CONFIG: -------------- RESPONSE --------------
HTTP/1.1 301 Moved Permanently
Content-length: 0
Location: https://www.docker.com/v2/francium25/base/manifests/latest
Mar 11, 2019 5:27:26 PM com.google.api.client.http.HttpRequest execute
CONFIG: -------------- REQUEST --------------
GET https://www.docker.com/v2/francium25/base/manifests/latest
Accept: application/vnd.oci.image.manifest.v1+json,application/vnd.docker.distribution.manifest.v2+json,application/vnd.docker.distribution.manifest.v1+json
Accept-Encoding: gzip
User-Agent: jib 1.0.0 jib-maven-plugin Google-HTTP-Java-Client/1.23.0 (gzip)
Mar 11, 2019 5:27:26 PM com.google.api.client.http.HttpRequest execute
CONFIG: curl -v --compressed -H 'Accept: application/vnd.oci.image.manifest.v1+json,application/vnd.docker.distribution.manifest.v2+json,application/vnd.docker.distribution.manifest.v1+json' -H 'Accept-Encoding: gzip' -H 'User-Agent: jib 1.0.0 jib-maven-plugin Google-HTTP-Java-Client/1.23.0 (gzip)' -- 'https://www.docker.com/v2/francium25/base/manifests/latest'
Mar 11, 2019 5:27:27 PM com.google.api.client.http.HttpResponse <init>
CONFIG: -------------- RESPONSE --------------
HTTP/1.1 404 Not Found
The correct URL is https://registry-1.docker.io/v2/francium25/base/manifests/latest
I see. So, suppose that I'm writing a CLI tool to push a local image docker.io/francium25/base to Docker Hub. Then, you are suggesting the tool should contact registry-1.docker.io as a workaround?
In any case, I think it is still incorrect to redirect the URL to 404.
Then, you are suggesting the tool should contact
registry-1.docker.ioas a workaround?
Can I have the tool depend on this contract? For example, this won't break in the future?
I found only two doc pages that explicitly reference registry-1.docker.io as the Docker Registry API endpoint: "Certify Docker Image", and "Registry as a pull through cache". Though other places on the web recommend using registry.docker.io.
It would be nice if https://docker.io/v2/ redirected to the right place rather than requiring tools maintain magic mappings.
I think docker.io/library/alpine is canonical name understood by engine which translates it to registry-1.docker.io. However I agree there should be one name that does the right redirect. I think multiple URLs are a historical mistake that are too scary to change due to its impact of breaking many tools.
@thajeztah do you know the relationship between docker.io, registry.docker.io and registry-1.docker.io?
And index.docker.io too :-)
@manishtomar hm, no, unfortunately not. Have been wondering a few times myself as well which one is the canonical URL (there's some hard-coded values in the engine code-base that could be updated as well)
It's also odd that registry.docker.io is a CNAME to registry-1.docker.io, but attempts to use it as a registry fail due to 503 Service Unavailable errors.
We are clearing up our old issues and your ticket has been open for one year with no activity. Remove stale label or comment or this will be closed in 15 days.
The issue still stands.
We are clearing up our old issues and your ticket has been open for 6 months with no activity. Remove stale label or comment or this will be closed in 15 days.
HUB-4585 is tracking this internally (sorry, that link is to the private jira)
We are clearing up our old issues and your ticket has been open for 6 months with no activity. Remove stale label or comment or this will be closed in 15 days.
.