glibc-dynamic base image. A Dockerfile.windows is also provided for Windows containers.
Pre-built images
Pre-built images are published to the GitHub Container Registry:Building the image
- Linux / macOS
- Linux (musl / static)
- Windows
The default This is equivalent to:
Dockerfile uses a multi-stage build. It builds the UI with Node, compiles the Rust binary (optionally with musl for a fully static binary), and copies only the final binary into the minimal runtime image.Dockerfile walkthrough
The LinuxDockerfile has four stages:
Dockerfile
- Build caches for
npmand Cargo registries are mounted as--mount=type=cacheto keep iterative builds fast. - The runtime image is
cgr.dev/chainguard/glibc-dynamic— a distroless image with no shell, minimal attack surface, and regular security updates. VERSIONandGIT_REVISIONbuild args are embedded in the binary. The build fails if version information is missing (the--versionoutput must not contain"unknown").
Running with Docker
Mount a configuration file
Pass your configuration file into the container as a bind mount and point the binary to it with-f:
Port mappings
The listener port (default
8080) is defined in your configuration file, not hard-coded. Adjust the -p flag to match whatever port you configure.Volume mounts
Environment variable configuration
You can override individual settings without modifying the config file by passing environment variables:Docker Compose examples
Agentgateway with telemetry
The repository includes adocker-compose.yaml in examples/telemetry/ that adds Jaeger and an OpenTelemetry collector alongside Agentgateway:
examples/telemetry/docker-compose.yaml
config.yaml
Agentgateway with an OpenAPI backend
Theexamples/openapi/docker-compose.yaml shows a petstore backend service running alongside the gateway:
examples/openapi/docker-compose.yaml
Health checks
Add a Docker health check so that container orchestrators can detect when Agentgateway is ready:docker-compose.yaml
Windows containers
ADockerfile.windows is provided for environments that require native Windows containers. It uses Windows Server Core (ltsc2022) as the build image and Nano Server as the runtime:
Dockerfile.windows