Build an agent image
Build and customize the Docker or Podman image used by your agents.
What the image contains
Section titled “What the image contains”The agent image contains the command-line tools your tasks will use. Generate a Dockerfile or Containerfile, add the tools your project needs and build it under a name such as outpost:dev.
- Base
node:24-bookworm-slimwith Git, the OpenSSH client, curl, Python 3 and process tools. - Agent CLIsClaude Code, Codex, Copilot CLI and Kimi Code from npm, Antigravity from a verified archive.
- Agent userThe image’s
nodeuser, renumbered to your UID and GID. - Private home
/home/agent, owned by the agent user with mode 700, set asHOME. - EnvironmentAntigravity auto-updates off, Copilot’s cache under
/tmp/.cache. - Working directory
/workspace, where commands start.
Generate the recipe
Section titled “Generate the recipe”The command builds the image and writes its Dockerfile in .outpost-image (Containerfile with Podman). It also writes example workflow files there; you can leave these aside and write your own TypeScript scripts. Add --no-build to generate the files without building.
These commands assume Outpost is installed, as in Installation. For Podman, add --sandbox-provider podman when generating and --engine podman when building.
Add project tools and rebuild
Section titled “Add project tools and rebuild”Add system packages and binaries as root, before the recipe’s final USER line.
| Option | Default | Effect |
|---|---|---|
--engine | docker | Build with docker or podman. |
--image | outpost:<directory name> | Tag of the built image. |
--file | Dockerfile, Containerfile for Podman | Recipe path, relative to the directory. |
--directory | Current directory | Build context and recipe location. |
--uid, --gid | Your user’s IDs | IDs given to the agent user. |
Containers run with your UID by default, and the provider refuses an image built for another UID. Build on the machine that runs the workflows, or pass --uid and --gid for the target user (user on the provider overrides the check).
Keep credentials out of the image
Section titled “Keep credentials out of the image”The image holds tools, never sign-ins. At each run, Outpost copies the harness’s host login or passes its API key into the private home (Authentication).
Update the pinned CLIs
Section titled “Update the pinned CLIs”Each Outpost release pins one version per CLI, exposed as agentVersions. init writes these versions into the recipe.
The script prints the Codex version pinned by your installed Outpost. After upgrading Outpost, generate a fresh recipe with --no-build in an empty directory, copy its install lines into yours, and rebuild.
Check the image
Section titled “Check the image”doctor starts a temporary container with the network disabled. It checks node, git, the writable home and the agent CLI, and warns when the CLI version differs from the pinned one. It uses the local image only and does not test sign-in (Diagnostics).
Remove the image
Section titled “Remove the image”Remove outpost:dev when you no longer need this image. This removes the image from the local container engine, independently of the retained Git branches.
Add --engine podman for Podman. Dependency cache volumes are separate and stay in place (Prepare the environment).
Images on remote sandboxes
Section titled “Images on remote sandboxes”Cloud sandboxes, Firecracker and private Git containers install a missing CLI on first use. When the agent’s executable is not on PATH, Outpost installs its pinned version into the sandbox home. Set bootstrap: false on the sandbox options to require the image to provide it.
Docker and Podman with a mounted checkout never install a CLI: the image must contain it.
Limits
Section titled “Limits”- Pins cover the agent CLIs only. The base image tag and Debian packages resolve at build time, so two builds can differ.
- Bootstrapping an npm CLI requires
npmin the remote image. outpost imagebuilds and removes local images; it does not push them to a registry.
API: agentVersions · createDockerSandboxProvider · createPodmanSandboxProvider · SandboxOptions.