Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manifest endpoint https://docker.io/v2/francium25/base/manifests/latest redirects to 404 #1767

Open
chanseokoh opened this issue Mar 11, 2019 · 14 comments
Labels

Comments

@chanseokoh
Copy link

chanseokoh commented Mar 11, 2019

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. (GoogleContainerTools/jib#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
@manishtomar
Copy link
Contributor

@chanseokoh
Copy link
Author

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.

@chanseokoh
Copy link
Author

Then, you are suggesting the tool should contact registry-1.docker.io as a workaround?

Can I have the tool depend on this contract? For example, this won't break in the future?

@briandealwis
Copy link

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.

@manishtomar
Copy link
Contributor

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?

@briandealwis
Copy link

And index.docker.io too :-)

@thaJeztah
Copy link
Member

@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)

@briandealwis
Copy link

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.

@github-actions
Copy link

github-actions bot commented May 8, 2021

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.

@github-actions github-actions bot added the Stale label May 8, 2021
@chanseokoh
Copy link
Author

The issue still stands.

@github-actions github-actions bot removed the Stale label May 10, 2021
@github-actions
Copy link

github-actions bot commented Nov 7, 2021

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.

@github-actions github-actions bot added the Stale label Nov 7, 2021
@thaJeztah
Copy link
Member

thaJeztah commented Nov 8, 2021

HUB-4585 is tracking this internally (sorry, that link is to the private jira)

@thaJeztah thaJeztah removed the Stale label Nov 8, 2021
@github-actions
Copy link

github-actions bot commented May 8, 2022

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.

@github-actions github-actions bot added the Stale label May 8, 2022
@thaJeztah
Copy link
Member

.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants