Use Docker or Podman
Configure local containers, repository mounts and the user that runs agent commands.
Prerequisites
Section titled “Prerequisites”Before running a task, check that the container engine responds and the agent image is available:
- Docker or PodmanInstalled and running. On macOS, start a Podman machine with
podman machine start. - An agent imageContains the agent CLIs your tasks will use.
- Working filesThis procedure mounts a Git checkout; directory and ephemeral sources also work without Git.
Configure
Section titled “Configure”Both providers take the same options. Pass the provider to dispatch(), createSandbox() or any workflow task.
Each allocation starts a fresh container from the image. Closing the sandbox removes it.
API reference: ContainerOptions, Volume and DependencyCache.
Repository access
Section titled “Repository access”The container mounts the task’s checkout at /workspace and the repository’s Git metadata under /outpost/git. The agent’s edits and commits land directly on the host, in the worktree Outpost prepared.
To expose more host paths, add volumes. A relative source starts from the repository; a target starting with ~/ lands in the agent home, any other relative target under /workspace.
- Private home
/home/agentis a tmpfs with mode0700, owned by the configured user and discarded with the container. The harness copies the agent’s credentials there. - Reduced privilegesLinux capabilities are dropped (
CHOWNstays for Podman home ownership, or when caches, file mounts or Private Git need it) andno-new-privilegesis set. - No engine accessThe Docker or Podman socket is never mounted.
Every mount, device and network you add widens what the agent can reach. To keep the host Git metadata out of the container, use Private Git.
Mount tooling from another image
Section titled “Mount tooling from another image”Set imageMounts to mount files from another image into the sandbox, read-only. Users can then bring their own sandbox image while your platform adds its launcher, Outpost or a CLI from a tooling image it controls. Each entry names an image, an optional absolute path inside it and a target in the sandbox.
Writes to the mount fail with Read-only file system. A target is an absolute path, or a ~/ path in the agent home, outside the workspace, /tmp and /outpost; invalid entries fail when the provider is created. ContainerImageMount lists every rule.
- Image already on the engine hostOutpost never pulls a mount image and does not check it beforehand. When it is missing, the engine fails to start the sandbox: Podman reports
image not known, DockerNo such image. - Engine versionsDocker Engine 28.0 with the containerd image store, which Docker requires for image mounts and enables by default on fresh Docker 29 installations, or Podman 2.2. A
pathneeds Podman 5.1; Docker supports it from 28.0. - Docker 28 and repeated imagesDocker 28.0 refuses to mount the same image twice in one sandbox (
AlreadyExists: lease … already existsatcreate); Docker 29.9 accepts it. On Docker 28, mount each image once, or use separate images. - Validation statusPodman behavior has been verified with rootless Podman 5.4 on Linux, including the remote client through
CONTAINER_HOST. Docker behavior has been verified by hand with Docker 29.9 and the containerd image store, and the Docker container tests in CI run it on Docker 28.0 with that store.
Check these points before relying on a mount:
- Self-contained toolingMounted files run against the sandbox image’s libraries. Ship statically linked binaries or a runtime bundled next to the program: a binary linked against glibc does not run in a musl image such as Alpine, and a CLI that needs Node.js fails in a sandbox image without Node.js.
- Targets in the homeUse a direct child of the home, such as
~/tools, or a path outside it, such as/opt/tools. For a deeper target such as~/.local/bin, the engine creates the missing folders owned by root, so the agent cannot write beside the mount, for example in~/.local/share. A single-file volume cannot sit under an image mount in the home, because Outpost prepares its parent folders inside the read-only image. - Nested mountsA bind or image mount under an image mount target needs its mountpoint to exist already in the read-only image; otherwise the container fails to start with
Read-only file system. - Remote enginesImage mounts read no path on the machine running Outpost, so they suit an engine reached through
CONTAINER_HOSTorpodman --remote.volumes, the defaultrepositoryMode: "mounted"and file workspaces bound asmount-readonlyormount-writestill read the caller’s disk; with a remote engine, userepositoryMode: "isolated"(Private Git) and novolumes.
API reference: ContainerOptions and ContainerImageMount.
Podman
Section titled “Podman”Rootless Podman maps your host user into the container with --userns keep-id, so files the agent writes stay owned by you. Set userns: false to leave the mapping to your Podman configuration. When Podman runs as root, set userns: "keep-id" to request it.
On SELinux hosts, keep the default label: "z" when mounts are shared by containers. Use "Z" for a private mount used by one container, or false when your host policy already handles labels. These settings change mount labels, not project permissions.
API reference: ContainerOptions.
outpost image eject --engine podman writes a Containerfile instead of a Dockerfile.
Find sandboxes by label
Section titled “Find sandboxes by label”Set labels to tag every sandbox a provider creates. The create command that creates the container sets them, and so does the one that creates its egress companion, so a container never exists without its labels.
A cleanup process can then find the sandboxes your application owns, including those whose name it never recorded. listDockerSandboxes() returns each Outpost sandbox that carries every given label, with its name and labels. removeDockerSandbox() removes a sandbox with its egress companion and succeeds when they are already gone. Podman has listPodmanSandboxes() and removePodmanSandbox().
- Any repository modeBoth functions work without the provider, whatever
repositoryModecreated the sandboxes. - Outpost containers onlyOnly containers named
outpost-<uuid>are listed or removed, never other containers carrying the same labels. - Your decisionRemoval does not check whether a run still uses the sandbox. A labelled sandbox is listed as soon as its containers are created, before
acquire()returns, so mark the job active beforeacquire()and clear it only afterrelease(). A removed sandbox’s next commands fail and its release still succeeds. - Reserved prefixKeys starting with
io.outpost.belong to Outpost and are left out of listed labels. Invalid labels, including values with surrounding whitespace, fail when the provider is created.
Listing requires at least one label. The engine reports image labels too, so choose keys your images do not set.
API reference: ContainerOptions, listDockerSandboxes, removeDockerSandbox and ContainerSandbox.
Limits
Section titled “Limits”- The provider never falls back to host execution. If the engine or image is missing, allocation fails; run Diagnostics.
- The image must provide
sh,setsid,kill,tarandcp. Generated images do. - When the image declares a numeric user that differs from the requested UID, allocation fails. Rebuild the image with your UID or set
user. egressaccepts onlydeny-all. Domain allowlists need a cloud sandbox or an external firewall.- A single file can be mounted only inside the agent home; mount its directory for other destinations.
- Mounted checkout and Git metadata are writable: this is not a boundary against a hostile agent (Security).
API: createDockerSandboxProvider · createPodmanSandboxProvider · listDockerSandboxes · listPodmanSandboxes · removeDockerSandbox · removePodmanSandbox · ContainerOptions · Volume · DependencyCache.

