Reputation:
how to get the list that contains names with tags of all docker images from self hosted gitlab-ce
server, so that i can run a script to download them all at once?
Though I would prefer to get this list from an gitlab API call, any other solution will also be appreciated.
(currently it returns max 50 items from one gitlab API call, but I want all)
Upvotes: 5
Views: 7454
Reputation: 41119
Use the container registry API.
There is a special catalog endpoint that can be used to list all container repositories in the whole instance. For each repository, you can use the repository details API which will contain all the tags for each repository, which you can then use to pull each image.
it returns max 50 items from one gitlab API call, but I want all)
Many GitLab endpoints are paginated, meaning you have to make multiple requests if there are many objects you're trying to get. See the pagination documentation for details on how to leverage pagination.
Upvotes: 2