I know that this can be done with dockerhub
. I want to know if there is something similar available for gitlab registry.
The use case is that, I have written a fabric script to revert a deployment to a particular tag provided by the user. Before actually pulling in the images, I want to know whether an image with the specified tag exists in the registry and warn the user accordingly.
I've searched in their documentation, but couldn't find anything.
Note: User here is the person who is deploying the code.
Unless the GitLab Container Registry supports the kind of curl dockerhub does (with
v1/repositories/$1/tags/$2
), I doubt it offers that feature.(See GitLab 16.7, Dec. 2023, at the end)
For instance, issue 26866 "GitLab Registry available images list/search" is still open after 10 months.
Update for GitLab 12.2 (April 2019, 18 months later)
So that could help checking if an
image:tag
exists.Update GitLab 13.0 (May 2020)
See also GitLab 14.7 (January 2022)
GitLab 16.7 (December 2023) adds: