Docker runtime
Experimental, unreleased on next (13 November 2026). Review limits.
@bakers-build/addon-runtime-docker fills the runtime slot, starting each run in a container at host paths. Machine scope:
js
{ use: '@bakers-build/addon-runtime-docker', with: { docker: 'podman' } }Before the first run
image(slot key) supplies an installed agent; otherwise the first run builds one frominstallCommand.- Set the agent credential in the secrets file: Claude uses
CLAUDE_CODE_OAUTH_TOKENorANTHROPIC_API_KEY. A container cannot use the host login.
Options
Generated from the options.schema.json of @bakers-build/addon-runtime-docker; change the schema, not this table.
| Option | Type | Default | Required | Effect |
|---|---|---|---|---|
image | string | — | Your container image, used for every agent and never built. Default: the shipped image, built on first use. | |
shared | boolean | false | Run clones borrow the parent repository's objects (git clone --shared) instead of copying them, for every workspace addon. Faster and smaller, but never prune or repack the parent with -d while a run is open. | |
docker | string | docker | The container CLI; podman also works. | |
mounts | array | [] | Extra absolute host paths, mounted read-only at the same path. | |
network | host | allowlist | host | host shares the host network; allowlist routes the run through the conductor's proxy. | |
allow | array | [] | Allowlist mode: hosts the run may reach, exact or *.suffix. |
js
// ~/.bakers/machine.config.js
runtime: { image: 'ghcr.io/acme/base:1', allow: ['image'] },
// .bakers/project.config.js
runtime: { image: 'ghcr.io/acme/php:8.3' },What a run sees
Container bb-run-<run uuid>, under your uid, mounts:
- the workspace: a fresh run clone of the ticket branch at the worktree path, made at every run start;
- the run's Git directory as
.git. It lives in the conductor's cache; the parent repository is not mounted. The optionsharedadds the parent'sobjects, read-only; .bakers/and the project'sruntime.read_onlypaths, read-only;- the bakers CLI package, read-only, never the global
node_modules; a root containing your home refuses to start; $XDG_CACHE_HOME/bakers/runtime/<run uuid>at its host path;- the read/write paths from neutral agent preparation: Claude plugins read-only and the worktree transcript directory writable. Docker has no Claude-specific adapter;
- with
network: hostand no API credential, the host's Claude login file, read-write inside the run home, so a token refresh reaches the host and every other run.
No ~/.ssh, ~/.bakers or Docker socket. Secrets use -e KEY, never values in argv.
Hook scripts are not copied; unreachable ones fail open. Grant them via mounts; automatic mounts expose host files.
Permissions stay unchanged. Each image's first run checks that the mounts leave its agent visible. The shipped image lacks bwrap/socat; unavailable sandboxes fail closed and consume retries. See prerequisites. Cleanup removes the container and home.
Delivery and limits
Commit inside the run: only checked commits come back, as isolated Git delivery describes. Install dependencies and build inside the run.
The DDEV web container is as untrusted as the run. bakers checks only a host command's entry point, not what that script calls. See residual risks.
Allowlist mode
With network: 'allowlist', runs join the internal network bb-runtime-<conductorKey>. Each conductor’s proxy is its runs’ only way out: HTTPS to allow hosts (others get 403), the agent's model API with the real credential added by the proxy, and the conductor tool server. The run holds a placeholder key. Each conductor's proxy serves one model API. The host's 127.0.0.1 is not reachable; use the conductor tools for DDEV and ports.
On macOS use allowlist mode; host networking cannot reach the host. macOS is untested.