Pick of the Week: The “mplatform/mquery” Docker Hub Image
Ajeet Singh Raina
?? Follow me for Docker, Kubernetes, Cloud-Native, LLM and GenAI stuffs | Technology Influencer | ?? Developer Advocate at Docker | Author at Collabnix.com | Distinguished Arm Ambassador
Here’s a question for you ~ How would you know if the Docker image that you are planning to download supports your platform? One obvious way is to visit?Docker Hub?and check out its “Tags” section. It’s a manual task. Right? There must be better way to tackle this.
Introducing the?mplatform/mquery?Docker image…
The mquery is 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. The tool allows you to query any public image in any public container repository. This image is created and pushed by a GitHub Action when any release occurs in the public GitHub repository?estesp/mquery.
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. The backend which performs registry queries is implemented as a web API-triggered Lambda function (code located in the?function?directory of the repository). It is possibly under heavy load that any particular instantiation of the Lambda function will get its IP rate limited as the queries are performed without authentication. This limitation only potentially affects DockerHub; other public registries may not have any rate limiting of queries at this time.
When run against itself, you can see the report of supported OS/architecture pairs. Here’s an example of a?Docker Extensions?image?docker/disk-usage-extension:
?
领英推荐
docker run --rm mplatform/mquery docker/disk-usage-extension:0.2.5
Image: docker/disk-usage-extension:0.2.5 (digest: sha256:02397941ad317744d0fded959f2a21f69d1f1cd4d7d9f2c9ba1be7e4a88f8375)
* Manifest List: Yes (Image type: application/vnd.docker.distribution.manifest.list.v2+json)
* Supported platforms:
- linux/amd64
- linux/arm64
?As shown above, the docker/disk-usage-extension image support both x86 as well as Arm platform. If you try it on your Apple M1 Pro, it will work flawlessly.
Here’s a glimpse of Disk Usage Docker Extensions up and running on Docker Desktop:
Lead Developer Advocate at Snowflake - The AI Data Cloud
2 年Another tool worth exploring https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane.md