Docker Image
The agent template ships the two-stage Dockerfile described here, on the base image.
Base image
Agent images build their runtime stage on ghcr.io/chamvi/node, built from images/node.
- Contents:
node:26-trixie-slim(Node.js 26, npm, corepack), ca-certificates,tinias the entrypoint (signals reach Node, orphaned processes are reaped),NODE_ENV=production,WORKDIR /appowned by root (the app reads its code, never writes it),USER 1000:1000(numeric, so KubernetesrunAsNonRootcan verify it); the default command isnode. The shell stays forkubectl exec. No git and no compiler: build native addons in anode:26-trixie-slimbuild stage (same Debian 13 glibc). - Platforms:
linux/amd64andlinux/arm64. - Tags:
24, rebuilt on every push tomasterthat changes anything underimages/(or the workflow), weekly for base image security updates and on manual runs, and24-<short sha>, one tag per such push tomaster(the weekly and manual rebuilds move only24). Pull requests that touch the image build and smoke-test it without pushing. - Pinning: reference a digest in production (
FROM ghcr.io/chamvi/node:26@sha256:...). - Workspaces: without git the image cannot host
@chamvi/sandbox-localworkspaces; in a cluster, run them with@chamvi/sandbox-k8sand the sandbox image.
Agent images
Agent repositories use a two-stage Dockerfile from the template:
- Build stage: install dependencies and bundle the app entry with
chamvi build. - Runtime stage: copy the bundle onto the base image and start it with an exec-form
CMD, soSIGTERMreaches Node (forwarded by the base image's tini) and the engine can drain.
The same image serves every mode: the long-running app, and a one-shot chamvi run-job <agent> [subscriptionId] (the agent's only cron subscription by default) for clusters that prefer Kubernetes CronJobs over in-process scheduling.
Tags for Flux
The template's CI pushes images tagged main-<sha>-<unix timestamp> for every push to the main branch, plus semver tags for releases. Flux image automation picks the newest tag and updates the HelmRelease. See Kubernetes & Flux.
Sandbox image
Agents that run untrusted code (reproducing a bug, running tests, fixing a dependency bump) do it in workspaces from a separate image, ghcr.io/chamvi/sandbox-dev, built from images/sandbox-dev. It runs as its own container (@chamvi/sandbox-docker) or pod (@chamvi/sandbox-k8s), never inside the agent's container.
- Contents:
debian:trixie-slim, git, ca-certificates, curl, ripgrep, jq, build-essential, unzip,tinias the entrypoint (the providers replace it with docker-init or the pod's pause container), GNU coreutilstimeout, and mise with its shims (in the workspace's HOME/home/sandbox, per workspace, on disk) at the end of thePATH; root by default,/workspaceand/cachewritable by any user. No language toolchain: a workspace installs one withmise use -g node@26(ormise installfrom the repository's version files) into mise's data directory in the workspace's HOME (/home/sandbox/.local/share/mise), per workspace;/cacheholds package downloads only. - Platforms:
linux/amd64andlinux/arm64. - Tags:
trixie, rebuilt on every change underimages/onmasterand weekly for Debian security updates, andtrixie-<short sha>, one tag per push tomasterthat changes the image (the weekly rebuild moves onlytrixie). Pull requests that touch the image build and smoke-test it without pushing. - Pinning: reference a digest in production (
ghcr.io/chamvi/sandbox-dev@sha256:...), or follow the mutable tag withpull: 'always'(Docker) orimagePullPolicy: 'Always'(Kubernetes). - Other images: you set
imageon the provider, and a run may pick one only from your allow-list (SANDBOX_IMAGES, or the manager'sallowImage; without onecreate_workspaceoffers noimage). The pull policy applies to every image. It needssh,gitand a GNUtimeoutthat takes-k(probed before the checkout), pluscat,head,mkdir,dirname,cp,mvandrm. - Removed:
ghcr.io/chamvi/sandbox-node:24is not built anymore; its last published image stays pullable, but gets no updates.
On a Docker host, the agent needs access to the Docker API to start sandbox containers. That access is root on the host: give the agent a socket proxy that allows only containers, exec and images, or run rootless Docker. See @chamvi/sandbox-docker.