Skip to content

Docker

Terminal window
docker build -t ogre .

The Dockerfile uses a multi-stage build:

  1. Build stage compiles the Go binary with CGO disabled
  2. Final stage uses Google’s distroless image

From a local build:

Terminal window
docker run -p 3000:3000 ogre

From GitHub Container Registry:

Terminal window
docker run -p 3000:3000 ghcr.io/macawls/ogre:latest

The container starts in server mode by default, listening on port 3000.

Terminal window
docker run -p 8080:8080 -e ADDR=:8080 ghcr.io/macawls/ogre:latest
VariableDefaultDescription
ADDR:3000Listen address
CORS_ORIGIN*Allowed CORS origin(s), comma-separated, supports wildcards
CACHE_MB64LRU cache size in MB
RATE_LIMIT0Requests per second per IP (0 = unlimited)
TIMEOUT10Render timeout in seconds
MAX_ELEMENTS1000Max HTML elements per render
Terminal window
docker run -p 3000:3000 \
-e CORS_ORIGIN=https://example.com \
-e CACHE_MB=128 \
-e RATE_LIMIT=10 \
ghcr.io/macawls/ogre:latest
services:
ogre:
image: ghcr.io/macawls/ogre:latest
ports:
- "3000:3000"
environment:
- CORS_ORIGIN=https://example.com
- CACHE_MB=128
restart: unless-stopped

The final image is minimal — distroless base with a single static binary. Typically under 10 MB.