Basic sandboxing (Docker)
Basic Docker sandboxing wraps the agent's execution environment in a container that is isolated from the host system.
- ·Dedicated development environments exist for agent execution (separate from developer's primary workspace)
- ·Basic sandboxing via Docker or equivalent containers is implemented
- ·Agent credentials are scoped per project (not a single org-wide key)
- ·Container images for agent environments are versioned and reproducible
- ·Credential rotation schedule exists for agent-scoped keys
Evidence
- ·Docker or container configuration files for agent environments
- ·Credential management configuration showing per-project scoping
- ·Environment provisioning documentation or scripts
What It Is
Basic Docker sandboxing wraps the agent's execution environment in a container that is isolated from the host system. The agent process runs inside the container with access only to what has been explicitly mounted and injected - a specific project directory, specific environment variables for credentials, and specific network access. The host's home directory, SSH keys, cloud credentials, and other projects remain invisible to the container.
Docker sandboxing is the most accessible form of agent isolation. Every developer on a modern team has Docker installed. Creating a Dockerfile for an agent runtime takes an afternoon. The result is a meaningful security boundary: the agent can affect files in the mounted project directory and make network calls to permitted hosts, but nothing else on the developer's machine is in scope.
The mechanics are simple. You create a Docker image that contains the agent's runtime dependencies (language runtimes, CLI tools, the agent software itself). When you want to run an agent task, you run a container from that image with a volume mount for the project directory and environment variables for the specific credentials the task needs. The container's filesystem is ephemeral - when the container exits, any state not in the mounted volume is gone. This ephemerality is a feature: the agent cannot accumulate persistent state outside the project directory.
Docker sandboxing does not solve every problem. Containers are not full VMs - a container running as root with broad Linux capabilities provides weaker isolation than a VM. Docker's default network mode allows outbound connections to any host. And Docker's startup time (5-30 seconds depending on image size) is acceptable for interactive developer use but becomes a bottleneck when spinning up hundreds of agent tasks. Basic Docker sandboxing is the right L2 tool; stronger isolation models (seccomp profiles, network policy, Firecracker VMs) come at L4.
Why It Matters
- Credential isolation without workflow disruption - mounting project-specific credentials as environment variables means agents get exactly what they need for the task, without inheriting the developer's full credential set
- Repeatable agent execution environment - the Dockerfile defines exactly what tools the agent has available, eliminating the "agent worked on my machine but not in CI" class of problems
- Safe blast radius for mistakes - an agent running in a container with a mounted project directory can corrupt files in that directory but cannot touch other projects, SSH keys, or cloud configurations
- Fast path to compliance - running agents in containers creates the audit trail and access boundary documentation that compliance auditors expect to see
- Foundation for CI integration - Docker containers are the native execution unit of CI systems; an agent that runs in a container locally can run identically in CI without any modification
Getting Started
6 steps to get from here to the next level
Common Pitfalls
Mistakes teams actually make at this stage - and how to avoid them
How Different Roles See It
Bob's team has been running agents in the developer's IDE with no isolation. A recent security audit flagged this as a risk and Bob has been asked to show a remediation plan. He knows Docker is the right tool but does not want to disrupt developer workflows while they are in the middle of a product sprint.
What Bob should do - role-specific action plan
Sarah is concerned that requiring Docker containers for agent execution will slow developers down. She has heard anecdotes that "the container setup is complex" and "agents run slower in containers." She wants to support better security practices but not at the cost of developer experience.
What Sarah should do - role-specific action plan
Victor has been thinking about Docker sandboxing for months and has been building a prototype on his own. He has a working Docker image for the team's main service with Claude Code installed and the project's dependencies pre-installed. Startup time is under 10 seconds. He has been running all his agent sessions in this container for two weeks without any workflow disruption.
What Victor should do - role-specific action plan
Further Reading
5 resources worth reading - hand-picked, not scraped
From the Field
Recent releases, projects, and discussions relevant to this maturity level.
Agent Runtime & Sandboxing