docker - 如何在不安全的注册表中列出Docker镜像

标签 docker

我在同一局域网内的另一台服务器上设置了一个不安全的注册表。有没有一种方法可以轻松列出不安全注册表中可用的图像?

最佳答案

我认为除了直接调用registry API之外,没有其他方法

$ curl http://localhost:5000/v2/_catalog
{"repositories":["myfirstimage","mysecondimage"]}

$ curl http://localhost:5000/v2/myfirstimage/tags/list
{"name":"myfirstimage","tags":["latest","toto"]}

有关完整列表,请使用jq:
for repository in $(curl -s http://localhost:5000/v2/_catalog | jq -r '.repositories[]'); do
  curl -s http://localhost:5000/v2/${repository}/tags/list | jq -r '(.name + ":" + .tags[])'
done

myfirstimage:latest
myfirstimage:toto
mysecondimage:latest

关于docker - 如何在不安全的注册表中列出Docker镜像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44774171/

相关文章:

docker: error during connect: 在 Windows 上的默认守护程序配置中,docker 客户端必须以提升的权限运行才能连接

docker - 如何为同一个 docker 注册表使用多个身份验证/登录

node.js - docker化 Node 应用程序后的内存限制是多少?

redis - Docker 尝试在使用 kubernetes 工具创建 redis pod 时下载不必要的 busybox 图像

asp.net - 尝试运行 ASP.NET 5 Docker 容器时出现异常

docker - 在 Docker 文件中运行命令

bash - 在 shell 脚本中处理 docker 事件

docker - linuxkit getty 陷入困境

postgresql - Docker postgres 不会从构建开始

authentication - Docker:保护私有(private)注册表的最简单方法是什么?