如何从自托管的gitlab服务器列出所有Docker映像的名称

发布于 2025-01-25 10:36:33 字数 172 浏览 3 评论 0 原文

如何获取包含来自自托管 gitlab-ce 服务器的所有docker图像标签的名称的列表,以便我可以运行一个脚本以一次下载它们?

尽管我希望从GitLab API调用中获取此列表,但也将不胜感激。

(目前,它从一个gitlab api呼叫中返回最大50个项目,但我想要全部)

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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

二智少女猫性小仙女 2025-02-01 10:36:33

使用容器注册表API

有一个特殊的目录端点,可用于。对于每个存储库,您可以使用将包含每个存储库的所有标签,然后您可以使用它们来拉每个图像。

它从一个gitlab api调用中返回最大50个项目,但我想要全部)

许多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.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文