Skip to main content

The image

Images are published by the release workflow when a vX.Y.Z tag is pushed. Until the first tagged release, build it locally with docker build -t warden:local . — the compose stack does this for you.Built from a private repository, the package starts private, and GitHub has no API for changing that — it is a one-time click in the package’s settings page. Until then, pulling needs a ghcr.io login.
Built in two stages:
  • Build stage — golang:1.25-bookworm, because a C toolchain is needed: Warden compiles PostgreSQL’s own parser, which is what lets it analyse SQL with the server’s real grammar rather than a regular expression.
  • Runtime stage — gcr.io/distroless/cc-debian12:nonroot. No shell, no package manager, running as UID 65532. The gateway holds database credentials, so the smallest image that can run it is the right one.
Mount your configuration and policies read-only, and give the state directory a named volume so the audit chain, leases, and idempotency keys survive a restart:
There is no shell in the image, so docker exec … sh will not work. That is deliberate. Use warden audit tail and the control plane from outside the container, or run the binary locally against the same state directory.

The compose stack

compose.yaml lives in the source repository, which is private, so this route needs access to it. Without access, the quickstart puts the same gateway in front of your own database.
It brings up PostgreSQL 17 with a seeded commerce schema and Warden in front of it:
Two properties worth noticing:
  • The database is not published to the host at all. Agents reach it through Warden or not at all — the demo enforces its own premise.
  • Warden’s port is published to 127.0.0.1 only, which is the only reason plaintext is acceptable there. Warden refuses a non-loopback listener without TLS unless the configuration says so explicitly.
The demo credentials in deploy/compose/warden.yaml are in plain sight on purpose, and the gateway warns about them at startup.

Configuration reference

Every field of warden.yaml, including data_dir, TLS, and lease bounds.