Docker
Docker is the recommended way to run superclaw in production. The hardened container profile gives you read-only rootfs, non-root execution, capability drops, and a narrow workspace mount with zero host surface.
Quick start
Pull the image from GitHub Container Registry and run a task against the current directory:
docker run --rm \
--user 1000:1000 \
--read-only \
--cap-drop ALL \
--security-opt no-new-privileges:true \
--pids-limit 64 \
--network host \
-e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
-v "$(pwd)":/workspace \
-v blaze-data:/data \
-w /workspace \
ghcr.io/akshaymemane/superclaw:latest \
"read the README and write a summary to summary.md"--read-onlyThe container root filesystem is mounted read-only. The agent can only write to /workspace and /data volumes.
--cap-drop ALLAll Linux capabilities are dropped. The agent process has no elevated kernel access.
--user 1000:1000Runs as a non-root user. Host files in /workspace are owned by UID/GID 1000.
no-new-privilegesPrevents the process from gaining additional privileges via setuid binaries.
--pids-limit 64Caps the number of processes the container can spawn, limiting run_bash abuse.
-v $(pwd):/workspaceMounts only the current directory. The agent cannot read or write outside this path.
docker-compose.yml
For repeatable runs or CI integration, use a Compose file. This example runs a single task and exits:
1version: "3.9"23services:4 superclaw:5 image: ghcr.io/akshaymemane/superclaw:latest6 user: "1000:1000"7 read_only: true8 cap_drop:9 - ALL10 security_opt:11 - no-new-privileges:true12 pids_limit: 6413 environment:14 - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}15 volumes:16 - ./workspace:/workspace17 - blaze-data:/data18 working_dir: /workspace19 command: >20 "research the latest Go release and write a summary to go-release.md"2122volumes:23 blaze-data:Running with Compose
# Run and stream logs
docker compose run --rm superclaw
# Override the task at runtime
docker compose run --rm superclaw "list all Go files and count lines of code"Environment variables
Pass configuration via environment variables inside the container. BLAZE_* variables override the corresponding superclaw.json fields:
# Required
ANTHROPIC_API_KEY=sk-ant-...
# Optional: override any superclaw.json field
BLAZE_MODEL=claude-haiku-4-5
BLAZE_MAX_STEPS=10
BLAZE_TIMEOUT=60
BLAZE_SKILLS=coding,github
# Optional: search backend (required for web_search tool)
BRAVE_API_KEY=BSA...| Variable | Maps to | Notes |
|---|---|---|
| ANTHROPIC_API_KEY | — | Required. Never baked into the image. |
| BLAZE_MODEL | model | Override the model ID. |
| BLAZE_MAX_STEPS | max_steps | Override step limit. |
| BLAZE_TIMEOUT | timeout_seconds | Override run timeout. |
| BLAZE_MAX_FETCH | max_fetch_calls | Override fetch limit. |
| BLAZE_SKILLS | skills | Comma-separated skill names. |
| BRAVE_API_KEY | — | Required for web_search tool. |
Volume mounts
/workspaceread + writeThe working directory for all file operations. read_file, write_file, patch_file, list_files, and run_bash all operate within this directory. Mount your project here.
-v "$(pwd)":/workspace/dataread + writepersistentSession history is written to /data/.superclaw/runs.jsonl. Mount a named volume here to persist history across container restarts. If not mounted, history is discarded when the container exits.
-v blaze-data:/dataSecurity profile
The recommended profile for production use:
| Setting | Value | Effect |
|---|---|---|
| --read-only | true | Root filesystem is read-only. No writes outside /workspace and /data. |
| --user | 1000:1000 | Non-root. No risk of host file ownership issues. |
| --cap-drop | ALL | No Linux capabilities. Cannot bind privileged ports, modify network, etc. |
| --security-opt | no-new-privileges:true | Disables privilege escalation via setuid/setgid. |
| --pids-limit | 64 | Process limit. Prevents fork bombs and subprocess sprawl. |
| --network | host (or bridge) | Restrict to bridge with egress rules for stronger isolation. |
Build the image from source
The official image uses a multi-stage build with a scratch base — only the static binary and CA certificates are included:
1FROM golang:1.23-alpine AS builder2WORKDIR /build3COPY . .4RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" \5 -o /superclaw ./cmd/superclaw67FROM scratch8COPY --from=builder /superclaw /superclaw9COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/10USER 1000:100011ENTRYPOINT ["/superclaw"]docker build -t superclaw:local .
docker run --rm -e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
-v "$(pwd)":/workspace superclaw:local "your task here"