Using the GitLab API to query its Docker registry

As part of my CI process, I want to only tag and push Docker images if a particular build has not been seen before, in order to avoid cluttering my registry with duplicate image entries. To do that, I wanted to be able to query a remote GitLab registry for images matching a particular hash, and this was not as trivial as I first thought.

I finally figured it out, using an internal GitLab API that is mentioned in the docs, so I assume it is reasonably stable. If you want to do this, or see how I do it so you can do it in another language, see the repo below:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.