Find a Matching Chainguard Image Using the API
How to call the Chainguard Image Matcher API with an existing SBOM to find the closest Chainguard image equivalent.
For the complete documentation index, see llms.txt.
The Chainguard Image Matcher is an API-based tool that analyzes the software bill of materials (SBOM) of an existing container image and returns a ranked list of Chainguard images that most closely match it. It is designed to support migration workflows where you know what you are running today and want to find the best Chainguard equivalent.
You supply an SBOM for your current image, along with the source Linux distribution. The Image Matcher maps the packages in your SBOM to Chainguard APK packages, scores each candidate Chainguard image based on how well its contents cover your requirements, and returns a ranked list of recommendations with confidence scores.
The matcher is deterministic: the same SBOM submitted to the same API will always produce the same results. There is no machine learning model involved. Results may change slightly over time as Chainguard improves its mapping data and publishes new images, but there is no per-request variation.
Each recommendation includes:
The number of candidates returned by the API is configurable, and the results are ranked by score. For well-known stacks such as nginx, postgres, or redis, the top result is typically the right choice. For less common images, the results may warrant human review.
The probability score is the matcher’s confidence estimate, normalized to a 0–100 scale. It is calculated from three weighted components:
The combined raw score is passed through a sigmoid-like transform and clamped to 0–100.
A score of 90 or above is a strong match. Scores in the 50–70 range warrant human review. The score is capped at 100, so multiple candidates may report the same top score while differing in their underlying ranking — use the overallScore field to differentiate them when needed.
Package weights are not uniform. The package that defines an image’s primary purpose (for example, postgres in the postgres image) carries a weight orders of magnitude larger than common shared dependencies like openssl or ca-certificates. This is why the matcher reliably identifies the right base image even when many low-level library names differ between distributions.
Linux distributions use different names for packages that provide the same upstream software. The matcher translates source package names from your SBOM into Chainguard APK names before scoring. This translation is where most of the recommendation logic is concentrated.
The following table shows representative examples of how the same upstream software appears across distributions and in the Chainguard catalog:
| Upstream project | Debian / Ubuntu | Alpine | Red Hat / Amazon Linux | Chainguard APK(s) |
|---|---|---|---|---|
| GNU C Library | libc6, libc-bin | (musl libc instead) | glibc | glibc |
| OpenSSL library | libssl3 | libssl3 | openssl-libs | libssl3, libcrypto3 |
| Apache HTTP Server | apache2 | apache2 | httpd | httpd |
| nginx web server | nginx | nginx | nginx | nginx-mainline, nginx-stable |
| PostgreSQL server | postgresql-16, postgresql-17 | postgresql16 | postgresql-server | postgresql-16, postgresql-17 |
| curl HTTP client | curl + libcurl4 | curl + libcurl | curl + libcurl | curl |
Two patterns are common:
libc6, libc-bin, and other sub-packages, while Chainguard ships the same software under the single name glibc. An SBOM listing libc6 is translated to glibc before any image is scored.nginx fans out to both nginx-mainline and nginx-stable; a reference to postgresql fans out to postgresql-16, postgresql-17, and so on.The matcher builds its package map from three sources, applied in priority order:
apache2 → httpd rename and version-specific PostgreSQL fan-out.melange build definition. When a source package’s identifiers overlap with a Chainguard APK’s, the matcher treats them as equivalent. This handles the long tail of common dependencies without per-package curation.Source packages that cannot be mapped appear in the unmatchedExternalPkgs field of the response. A long list of unmatched packages is normal for general-purpose distributions like Debian: most entries are build-time tools, base-image scaffolding, or documentation packages that Chainguard’s minimal images do not include.
dist_name with each request. Providing dist_version and arch is optional but improves results.purl and cpe fields. SBOMs that lack these fields on components will produce weaker results.Last updated: 2026-05-26 00:00