-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
API - image_id tag returns null #1490
Comments
@Alexanderweber the url does not actually go directly to the v2 registry (though the URL confusingly indicates that it does). What is your use case for getting the image_id? The registry will return a manifest for an image, the contents of which are described here |
Hey sorry to poke at this almost a year after it was closed. But my use case for the getting the image_id is to do cross checks against images running on a machine to see if a newer image is available (and if so signal it). E.g. using: It might be that there is a better way to check for updates to images running (that does not involve running |
@mkrogh in the future please open up new issues even to ask questions rather than commenting on older issues. Since Docker 1.12 every image pulled from a registry will have a digest saved, in the JSON, look for the "RepoDigests" field in the returned elements. You can compare this with the "Docker-Content-Digest" field returned by the registry when hitting the manifests endpoint with the tag. If the digest returned from the manifests endpoint is not in the "RepoDigests" field, then there is an update. I might also consider using notary and Docker Content Trust if running a private registry, you would compare the digest returned by notary rather than the digest returned by the manifests endpoint. |
I am trying to retrieve the docker image ID through the API. Using following URL:
https://registry.hub.docker.com/v2/repositories/mesosphere/marathon/tags/v0.11.1/
I am getting this result back:
The desired
image_id
tag is null, but it should be a 12 char string. How do I get it?The text was updated successfully, but these errors were encountered: