Skip to content

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 from installCommand.
  • Set the agent credential in the secrets file: Claude uses CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_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.

OptionTypeDefaultRequiredEffect
imagestring—Your container image, used for every agent and never built. Default: the shipped image, built on first use.
sharedbooleanfalseRun 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.
dockerstringdockerThe container CLI; podman also works.
mountsarray[]Extra absolute host paths, mounted read-only at the same path.
networkhost | allowlisthosthost shares the host network; allowlist routes the run through the conductor's proxy.
allowarray[]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 option shared adds the parent's objects, read-only;
  • .bakers/ and the project's runtime.read_only paths, 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: host and 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.