createDockerSandboxProvider
Purpose and behavior
Section titled “Purpose and behavior”Create the Docker provider, used when sandboxProvider is omitted. By default the worktree and its Git metadata are mounted at /workspace; repositoryMode isolated uploads the history instead. Each acquire creates a container, and release removes it.
Complete example and detailed rules.
Parameters and properties
Section titled “Parameters and properties”optionsOptionalContainerOptions | undefinedContainer image, repository mode, mounts, environment, network and resource limits.options.egressOptionalEgressPolicy | undefineddeny-all uses the none network. An allowlist starts a dedicated proxy and namespace firewall before sandbox commands: domains allow HTTP on port 80 and HTTPS CONNECT on 443 with matching TLS SNI; CIDRs allow raw TCP/UDP, with denyCidrs taking precedence. Explicit networks conflict with an allowlist. See the network guide for image publication and validation limits.options.egressImageOptionalstring | undefinedOverride the trusted companion image for an allowlist. Use an immutable digest in production. The engine downloads a missing image. Omitting this option uses the public amd64/arm64 image pinned by verified digest in Outpost. Build images/egress and set this explicitly to test a local companion. The image must implement the matching Outpost egress runtime protocol.options.repositoryModeOptional"mounted" | "isolated" | undefinedmounted (default) mounts the worktree at /workspace with its Git metadata. isolated makes the provider remote: the history is uploaded to /tmp/outpost/workspace, volumes cannot expose the host repository, and durable speculation recovery is unavailable.options.cachesOptionalreadonly DependencyCache[] | undefinedNamed engine volumes mounted at /outpost/cache/<name> that outlive the sandbox. The volume is derived from repository, image, user, name and key; explicit volumes must not overlap /outpost/cache.options.imageOptionalstring | undefinedImage to run, default outpost:<repository directory name>. When user is unset and the image declares another numeric user than yours, acquisition fails with code provider.options.userOptional{ readonly uid: number; readonly gid: number; } | undefinedUID and GID of sandbox commands, default your host IDs (1000:1000 where unavailable). UID 65532 is reserved for the dedicated egress proxy when an allowlist is configured.options.volumesOptionalreadonly Volume[] | undefinedExtra host mounts into the container.options.imageMountsOptionalreadonly ContainerImageMount[] | undefinedRead-only mounts of images already present on the engine host, with the ContainerImageMount rules. Unlike volumes, they read no path on the machine running Outpost, so they also work with a remote engine. Provider creation validates every entry, including unknown fields and reserved targets, and throws a ConfigurationError located at imageMounts.<index>. Outpost neither pulls nor checks the images: a missing image makes the engine fail to start the sandbox, with Podman’s image not known or Docker’s No such image. Image mounts always use —mount syntax; label does not apply to them.options.variablesOptionalReadonly<Record<string, string>> | undefinedEnvironment variables set for every command in the sandbox, as literal values. A key the agent also declares fails with code configuration.options.networksOptionalstring | readonly string[] | undefinedEngine networks passed as —network. An egress allowlist refuses explicit networks because Outpost owns the filtered network namespace.options.groupsOptionalreadonly (string | number)[] | undefinedSupplementary groups for the container user, passed as —group-add.options.devicesOptionalreadonly string[] | undefinedHost devices exposed to the container, passed as —device.options.cpusOptionalnumber | undefinedCPU limit passed as —cpus; must be positive.options.memoryMbOptionalnumber | undefinedMemory limit in megabytes, an integer of at least 64.options.labelOptionalfalse | "z" | "Z" | undefinedSELinux relabeling of bind mounts on Linux: z shared (default), Z private, false plain bind mounts.options.labelsOptionalReadonly<Record<string, string>> | undefinedCaller labels set by the create command of the sandbox container and of its egress companion, so they exist as soon as the container does, with the ContainerLabels rules. Invalid or reserved labels fail at provider creation with a ConfigurationError located at labels.<key>; a reserved key also carries a hint. listDockerSandboxes and listPodmanSandboxes find sandboxes by these labels. Unrelated to label, which controls SELinux relabeling.options.retainOptionalnumber | undefinedBytes of output tail kept per stream, default 65536.options.usernsOptionalfalse | "keep-id" | undefinedPodman user namespace: keep-id maps your user and applies by default when Outpost does not run as root; false disables it. Docker ignores it.

