Dockerfile Reference
Overview
The multi-stage Dockerfile produces a deployment-ready Ubuntu 24.04 image with Claude Code and 32+ SRE/DevOps tools. The container runs as non-root (UID 10000) with tini as PID 1 for proper signal handling and zombie process reaping.
Build Stages
The Dockerfile uses two build stages. Stage 1 downloads static binary tools, and Stage 2 assembles the final runtime image — installing apt packages, copying tools from Stage 1, and installing Claude Code via its native binary installer.
Multi-Stage Build
Two stages: tools-downloader feeds static binaries into the runtime image.
Version Pins
All tool versions are pinned via global ARG declarations at the top of the Dockerfile. This ensures reproducible builds and explicit upgrade control.
| ARG | Version | Purpose |
|---|---|---|
| UBUNTU_VERSION | 24.04 | Base OS image |
| CLAUDE_CODE_VERSION | 2.1.62 | Claude Code CLI (native binary) |
| TINI_VERSION | 0.19.0 | Minimal init system (PID 1) |
| KUBECTL_VERSION | 1.35.1 | Kubernetes CLI |
| HELM_VERSION | 4.1.1 | Helm package manager |
| K9S_VERSION | 0.50.18 | Terminal-based K8s UI |
| STERN_VERSION | 1.33.0 | Multi-pod log tailing |
| KUBECTX_VERSION | 0.9.5 | Context/namespace switcher |
| JQ_VERSION | 1.8.1 | JSON processor |
| YQ_VERSION | 4.52.4 | YAML processor |
| TRIVY_VERSION | 0.68.2 | Vulnerability scanner |
| GRYPE_VERSION | 0.109.0 | Container image scanner |
Installed Tools
Tools are organized by category, matching the structure in verify-tools.sh. Privileged tools (marked with *) require elevated capabilities at runtime and are verified by binary existence only.
| Category | Count | Tools |
|---|---|---|
| Network | 9 | curl, dig, nmap, tcpdump*, wget, netcat, ip, ss, ping |
| Process/System | 6 | htop, strace*, ps, top, perf*, bpftrace* |
| Kubernetes | 6 | kubectl, helm, k9s, stern, kubectx, kubens |
| Data/Log | 3 | jq, yq, less |
| Database Clients | 3 | psql, mysql, redis-cli |
| Security | 2 | trivy, grype |
| Standard | 8 | git, vim, nano, unzip, file, tree, ripgrep, bash |
| Claude Code | 1 | claude |
* Requires elevated capabilities (CAP_NET_RAW, CAP_SYS_PTRACE). Checked for binary existence only during verification.
Security
The container follows Kubernetes security best practices:
- Non-root execution -- UID/GID 10000, above the typical system (0-999) and user (1000-9999) ranges. Avoids host UID conflicts and satisfies PodSecurityStandard restricted profiles.
- podSecurityContext alignment -- The Helm chart sets
runAsUser: 10000,runAsGroup: 10000,runAsNonRoot: trueas belt-and-suspenders with the Dockerfile's USER directive. - Pre-configured Claude settings -- Bypasses permission prompts, disables telemetry, autoupdater, and error reporting. Settings are staged in
/app/.claude-settings.jsonand copied into the PVC at/app/.claude/settings.jsonby the entrypoint on each startup. - tini as PID 1 -- Provides proper signal forwarding (SIGTERM, SIGINT) and zombie process reaping. Docker does not provide init behavior by default.
Multi-Architecture Support
The Dockerfile supports both linux/amd64 and linux/arm64 via Docker BuildKit's TARGETARCH variable. Each tool download maps TARGETARCH to the vendor's naming convention:
- Standard (amd64/arm64) -- kubectl, helm, k9s, stern, jq, yq, grype
- kubectx/kubens -- uses
x86_64instead ofamd64 - trivy -- uses
64bit(amd64) andARM64(arm64) - Claude Code -- native installer auto-detects architecture