Bash命令列出远程registry中的所有泊坞窗图像

我有一个程序设置来远程pipe理本地networking上各种PC上的图像和容器。 我希望能够获得在registry中可用的所有图像的列表。 我有registry机器的IP,我正在寻找一些命令来列出该registry中的一切,所以我可以通过存储库/标签进行sorting。

谢谢你的帮助。

我想你使用最新的v2dockerregistry。

Docker Registry v2有一个定义良好的REST API 。

例如,如果您在位置: registry.example.com:5000 : registry.example.com:5000和https代理处有registry,则可以使用address: https://registry.example.com:5000/v2/_catalog : https://registry.example.com:5000/v2/_catalog : registry.example.com:5000 /v2/ https://registry.example.com:5000/v2/_catalog列出所有存储库。

这里是列出registry中前100个存储库及其标签的示例。 请注意,存储库和标签的分页需要比这个简单的例子更仔细。

 registry="registry.example.com:5000" repos=`curl https://$registry/v2/_catalog?n=100 | jq '.repositories[]' | tr -d '"'` for repo in $repos; do curl https://$registry/v2/$repo/tags/list; done