packaged by Chainguard
Catalog Starter gives your team 5 production-grade container images, free forever, with no contract or sales call. Sign up with your work email.
Try Starter for freeChainguard Harness uses frontier models from Anthropic, OpenAI, and Google to attack a copy of your app built on query-exporter. It finds exploitable, validated issues that SAST and DAST tools aren't built to find.
A minimal, wolfi-based image for query-exporter, a Prometheus exporter that runs SQL queries against databases and exposes the results as metrics.
Chainguard Containers are regularly-updated, secure-by-default container images.
For those with access, this container image is available on cgr.dev:
Be sure to replace the ORGANIZATION placeholder with the name used for your organization's private repository within the Chainguard Registry.
The Chainguard query-exporter image is a replacement for the upstream adonato/query-exporter image. It is built with Python and licensed under GPL-3.0-or-later. Like upstream, it uses /config as its working directory and volume, sets QE_HOST=0.0.0.0 so the exporter listens on all interfaces, and keeps the application's virtual environment available at /virtualenv.
The image bundles the PostgreSQL (psycopg2), MySQL and MariaDB (mysqlclient), Microsoft SQL Server (pymssql), Oracle (oracledb) and ClickHouse (clickhouse-sqlalchemy) drivers, plus SQLite support from the Python standard library. The IBM Db2 (ibm-db-sa) and Teradata (teradatasqlalchemy) drivers that upstream's image includes are not shipped, because they depend on proprietary vendor client binaries.
Unlike upstream, which runs as root, this image runs as the non-root nonroot user (UID 65532) by default. The exporter only reads its configuration, so the mounted configuration file must be readable by that user.
Create a config.yaml file that declares the databases to connect to, the metrics to export, and the queries that produce them:
Mount the directory that contains it at /config. The exporter reads config.yaml from its working directory by default:
Metrics are served on port 9560 at /metrics:
To validate a configuration file without starting the exporter, pass --check-only:
Command-line options can also be set through environment variables prefixed with QE_, for example:
QE_CONFIG (--config): The configuration file to load. Defaults to config.yaml in the working directory.QE_HOST (--host): The addresses to bind. The image sets it to 0.0.0.0.QE_PORT (--port): The port to listen on. Defaults to 9560.QE_LOG_LEVEL (--log-level): The minimum level for log messages.The image sets TZ=UTC, matching the upstream image's UTC local time. Set TZ to another timezone name to change the timezone used by query schedule expressions.
Run the image with --help for the full list of options. Refer to the upstream configuration documentation for the configuration file format.
The exporter listens on port 9560. The image does not declare exposed ports, so publish the port explicitly, for example with -p 9560:9560. The image declares /config as a volume.
Chainguard's free tier of Starter container images are built with Wolfi, our minimal Linux undistro.
All other Chainguard Containers are built with Chainguard OS, Chainguard's minimal Linux operating system designed to produce container images that meet the requirements of a more secure software supply chain.
The main features of Chainguard Containers include:
For cases where you need container images with shells and package managers to build or debug, most Chainguard Containers come paired with a development, or -dev, variant.
In all other cases, including Chainguard Containers tagged as :latest or with a specific version number, the container images include only an open-source application and its runtime dependencies. These minimal container images typically do not contain a shell or package manager.
Although the -dev container image variants have similar security features as their more minimal versions, they include additional software that is typically not necessary in production environments. We recommend using multi-stage builds to copy artifacts from the -dev variant into a more minimal production image.
To improve security, Chainguard Containers include only essential dependencies. Need more packages? Chainguard customers can use Custom Assembly to add packages, either through the Console, chainctl, or API.
To use Custom Assembly in the Chainguard Console: navigate to the image you'd like to customize in your Organization's list of images, and click on the Customize image button at the top of the page.
Refer to our Chainguard Containers documentation on Chainguard Academy. Chainguard also offers VMs and Libraries — contact us for access.
This software listing is packaged by Chainguard. The trademarks set forth in this offering are owned by their respective companies, and use of them does not imply any affiliation, sponsorship, or endorsement by such companies.
Chainguard's container images contain software packages that are direct or transitive dependencies. The following licenses were found in the "latest" tag of this image:
For a complete list of licenses, please refer to this Image's SBOM.
Software license agreementChainguard Containers are SLSA Level 3 compliant with detailed metadata and documentation about how it was built. We generate build provenance and a Software Bill of Materials (SBOM) for each release, with complete visibility into the software supply chain.
SLSA compliance at ChainguardThis image helps reduce time and effort in establishing PCI DSS 4.0 compliance with low-to-no CVEs.
PCI DSS at Chainguard