如何从自托管的gitlab服务器列出所有Docker映像的名称
如何获取包含来自自托管 gitlab-ce
服务器的所有docker图像标签的名称的列表,以便我可以运行一个脚本以一次下载它们?
尽管我希望从GitLab API调用中获取此列表,但也将不胜感激。
(目前,它从一个gitlab api呼叫中返回最大50个项目,但我想要全部)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用容器注册表API 。
有一个特殊的目录端点,可用于。对于每个存储库,您可以使用将包含每个存储库的所有标签,然后您可以使用它们来拉每个图像。
许多gitlab端点是分页的,这意味着如果您想获得许多对象,则必须提出多个请求。请参阅分页文档有关如何利用分页的详细信息。
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.
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.