dockermarathonmesosphere

List all images in Mesosphere/Marathon


I am using Mesosphere Marathon. ON Mesos we host our container application. The number of applications are more. Is there a way we can list down all the container images which are being used in my Mesos rather than going one by one to check in each application configuration.


Solution

  • You can create a script using the marathon API. See https://your.marathon.fqdn/api-console/index.html

    The /v2/apps/ endpoint gives a json list of all applications. if you pipe this to jq (or maybe another tool) you can get the list of images:

    curl https://your.marathon.fqdn/v2/apps | jq -r .apps[].container.docker.image