Skip to main content
The Docker provider starts one local Linux container for each task execution. Use it when you want a reproducible filesystem and task-level isolation while keeping compute on the local host. AgentCompass supports this local Docker provider on Linux and WSL 2 only, not on native macOS or Windows. A matched recipe can supply defaults such as the image and workspace; compatible explicit settings are usually preserved.

Before You Start

  1. Install Docker Engine on Linux, or install Docker Engine / enable Docker Desktop WSL integration in WSL 2. Do not connect the same workflow to two Docker daemons.
  2. Make sure the current user can access Docker non-interactively. You can first run docker version and docker run --rm hello-world.
  3. For private images, run docker login <registry> before AgentCompass. AgentCompass does not store or manage registry credentials.
The Docker daemon has broad host privileges. Do not add untrusted users to the docker group, and do not mount sensitive host directories without reviewing the access granted to the container.

Validate the Configuration with run

This example uses SWE-bench Verified with mini-swe-agent. It selects one task through sample_ids, and the matched recipe supplies its image and workspace:
The command above is a minimal agentcompass run check. See agentcompass run for model endpoint and other shared options. Docker also supports agentcompass launch. Put shared Docker settings under defaults.environment in the orchestration file, or request-specific settings under requests[].environment; write id: docker and the Docker parameters at the same level. See the launch mapping rules.

Parameter Reference

Pass parameters with --env-params, or place them under environments.docker in a configuration file. The recipe in the example above supplies the task image. Add the following option to limit each task container to 2 CPU cores and 6 GiB of memory:

Connection and Credentials

The Docker provider does not accept registry credentials. The Docker CLI reads credentials configured for the user that executes the command. Run docker login as that user first; when use_sudo_docker is enabled, also make sure the sudo execution identity can read the required credentials.

Image and Startup

Identity and Metadata

Workspace and Environment Variables

FieldDefaultMeaning
workspace/workspaceAbsolute path inside the container where task commands run, passed as Docker —workdir. Docker creates the directory when it is missing. It should match the project or task root in the image.
default_workspace_root/workspace/Fallback workspace root exposed to the Harness when the Benchmark does not specify a task working directory. It does not change the container working directory set by workspace.
env{}Environment variables supplied as a mapping and injected into the task container as key=value; string values are recommended. Do not put long-lived secrets in a public configuration file.
mounts[]Docker mount list. Each item can be a source:target[:mode] string or an object with source, target, and optional mode. The source is a host path or Docker volume, the target is an absolute container path, and the mode can be ro or rw.

Resources

Network

FieldDefaultMeaning
networkUnset; Docker bridge for external accessDocker network used by a public task container and by the network-policy proxy for external access. Phase transitions require a bridge-style network.
allowlist_proxy_imagepython:3.12-alpineContainer image used by the network-policy proxy for allowlist or a policy transition between phases. The image must provide an executable python. Override it only for an internal registry or a pinned image source.
See Network Policy and Resource Limits for shared controls.

Lifecycle and Timeouts

The Docker provider has no separate task-container lifecycle or command-timeout parameters. It removes the container when the Environment closes normally; use --keep-environment to retain it, and use Run Controls for the overall evaluation timeout.

Parameter Sources

  • Run agentcompass config docs env docker to see the fields, types, and defaults supported by your installed AgentCompass version.
  • See Docker’s docker container run reference for native parameter behavior and Resource constraints for CPU, memory, swap, and GPU controls.
Use the agentcompass config docs env docker output for accepted fields, types, and defaults. Use the documentation for the connected Docker daemon version for native image, mount, and resource semantics.

Provider-Specific Behavior

  • The task fails before container creation if image is still empty after recipes and explicit configuration are merged.
  • A fixed name is reused for every task container created through this provider. Concurrent creation, --keep-environment, or a previous cleanup failure can leave the name occupied, so generated names are usually safer.
  • Normal environment close force-removes the task container. With --keep-environment, AgentCompass skips that close operation.
  • command must keep the container alive so that the harness can run later commands.

Troubleshooting