-
Notifications
You must be signed in to change notification settings - Fork 48
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
Request for official Hub repository using v2 API #1253
Comments
Docker Hub (hub.docker.com) is not the registry you're pulling from; Docker Hub is a web interface that allows you to browse the repositories/images that are available to pull from the Docker Registry The registry itself is at https://registry-1.docker.io Also see https://github.com/moby/moby/blob/master/contrib/download-frozen-image-v2.sh which is a shell script to download images without using docker, and may provide some insight as to what docker does when pulling an image |
Hi, thank you for the answer. The link is useful, I'll check it out. |
By the way, using the registry... could you help me out with authentication to the registry? I kinda tried to follow the Docker guide I am still getting I recieved the token in all cases, then I used it in the authorization header as |
I think there's two tokens in use; a short-lived token for pulling each image, and an authorisation header if to access private repositories. What exactly are you trying to do? I this to get a list of tags for a repository? |
Yes, I know. At the moment I want to list tags and description of an official repository. It works for public repositories like fedora/apache, but not for the official ones, like fedora. |
Does it work if you use |
Aaah there we go... Finally it works. If it is in docs and I missed it then well.. serves me right.. Otherwise this should really be stated somewhere. Thank you very much. |
@CermakM how to get registry image tag, i also try "curl https://registry-1.docker.io/v2/_catalog" |
@tmc9031 you need to provide authorization token to the curl as well, see the example from this conversation, official documentation or place a question on https://stackoverflow.com/. If you think there is an issue or bug in the implementation, open another issue ;). |
I couldn't make this work and did not want to create an api token to query public information on available tags. I found this api URL works for GET or HEAD: // omit the tag if you want a list...
await axios.head(`https://hub.docker.com/v2/repositories/library/node/tags/${nodeLtsVersion}`); YMMV |
@mlandisbqs that's the Docker Hub API (so specific to Docker Hub, not the registry); it's documented in the "reference" section of the documentation; https://docs.docker.com/reference/; That endpoint is documented here; |
@thaJeztah -- this was my experience based on that doco... not sure what the special sauce is to make that work |
|
Hello, I am trying to query tags from official Docker Hub repository.
What I am doing is getting response to 'GET' request on:
https://hub.docker.com/v2/repositories/<namespace>/<repo>/tags/
Which works just fine for public user repos like fedora/apache.
My question is how to query official repo, ie. fedora
I tried
https://hub.docker.com/v2/repositories/fedora/tags/
or using
_
andofficial
as<namespace>
None of it works. I'd really appreciate your help.
Thank you,
Marek.
The text was updated successfully, but these errors were encountered: