【发布时间】:2019-11-18 02:55:26
【问题描述】:
我正在使用 Mesosphere Marathon。在 Mesos 上,我们托管我们的容器应用程序。申请的数量更多。 有没有一种方法可以列出所有在我的 Mesos 中使用的容器镜像,而不是一一检查每个应用程序的配置。
【问题讨论】:
标签: docker marathon mesosphere
我正在使用 Mesosphere Marathon。在 Mesos 上,我们托管我们的容器应用程序。申请的数量更多。 有没有一种方法可以列出所有在我的 Mesos 中使用的容器镜像,而不是一一检查每个应用程序的配置。
【问题讨论】:
标签: docker marathon mesosphere
您可以使用 marathon API 创建脚本。见https://your.marathon.fqdn/api-console/index.html
/v2/apps/ 端点提供所有应用程序的 json 列表。如果你将它传递给 jq (或者可能是另一个工具),你可以获得图像列表:
curl https://your.marathon.fqdn/v2/apps | jq -r .apps[].container.docker.image
【讨论】: