mquery
A simple utility and serverless-based backend for querying Docker v2 & OCI v1 container images
and reporting on "manifest list"/OCI "index" multi-platform image support.
About
This project uses AWS Lambda as a backend, in concert
with the manifest-tool inspect API capability
to easily report on the status of whether an image is a manifest list/OCI index entry in a
registry, and if so, what platforms are supported by the image.
Usage
You can use the public endpoint with curl
and JSON formatting tools to query images directly.
See the next section for a tool which performs this for you and provides a simple text output.
This tool is published as a multi-platform image on DockerHub as mplatform/mquery
; for example
you can look up the ubuntu:latest
image as follows:
$ docker run --rm mplatform/mquery ubuntu:latest
Image: ubuntu:latest
* Manifest List: Yes
* Supported platforms:
- linux/amd64
- linux/arm/v7
- linux/arm64/v8
- linux/ppc64le
- linux/s390x
This project also includes a tool for querying the Lambda API Gateway-fronted endpoint with
a simple/readable output format for showing the list of platforms supported by a specific
image. You can build the tool yourself using the Makefile
, or you can use a pre-packaged
multi-platform image on DockerHub as shown in the section above.
This Go program requires the github.com/dghubble/sling and
github.com/opencontainers/image-spec/specs-go/v1 packages.
You can add these to your Go development environment with:
$ go get -u github.com/dghubble/sling
$ go get -u github.com/opencontainers/image-spec/specs-go/v1
References
More information about manifest lists and multi-platform image support is available in these blog posts:
Also see the manifest-tool project for an easy to use tool
for assembling and pushing manifest lists and OCI index images.
License
This project is licensed under the Apache Public License, v2.0.