Docker Launches Micro VM Sandbox: Giving AI Agents a Safe Home

Docker launches Sandboxes micro VMs for AI agents, combining VM isolation with container speed.
Docker has launched Sandboxes micro VMs, offering independent runtime environments for AI coding agents like Claude Code, Codex, and Cursor. Each sandbox has its own kernel, filesystem, network stack, and built-in Docker engine, booting in just 1.3 to 3 seconds. Security relies on directory isolation, fake token proxies, and network allowlists. The article also covers risks like full-access shared directories and local MCP servers, and notes containers still win for short tasks.
Title
Docker Launches Micro VM Sandbox: Giving AI Agents a Safe Home
Meta Description
Docker launches Sandboxes micro VMs designed for AI agents. This article explains how they work, their security boundaries, installation and usage, and how they differ from containers, exploring why a container company would build virtual machines.
Article Content
Docker, the company famous for container technology, recently did something unexpected: it launched its own virtual machine. Yes, the very same Docker that once convinced developers containers would replace VMs is now having us use a micro VM built by Docker itself. The logic behind this isn't a step backward—it's for an entirely new user group: AI agents.
Why Is Docker Building Virtual Machines?
Docker's new tagline is "Trust Docker for the agents." The core of this shift is that AI coding agents like Claude Code, Codex, and Cursor don't need a simple code runner—they need a "computer" of their own. Inside it, they need the freedom to install software, spin up databases, and run containers to test applications. Putting them directly on your host machine carries obvious risks; putting them in traditional containers falls short on isolation due to the shared kernel and makes it hard to safely run nested Docker.
Hence Docker Sandboxes was born. It's not a container but a true micro VM—each sandbox has its own independent kernel, filesystem, and network stack, and even comes with its own Docker engine. This means agents can work inside it just like on your computer, without touching your real environment.

Shared Kernels and Nested Containers
Traditional containers (like Docker containers) share the same OS kernel with the host, achieving process, network, and filesystem isolation through namespaces and cgroups. This design makes containers extremely lightweight, but the isolation boundary stops at the abstraction layer provided by the kernel—once a process inside the container exploits a kernel vulnerability to escalate privileges, it may break through the isolation and affect the host. Moreover, standard containers cannot by default start a full Docker engine inside, because nested operation requires additional privileged modes or DinD (Docker-in-Docker) solutions, which further weaken isolation. AI agents often need to install software, start databases, and run containers to test applications—exactly the needs that shared-kernel containers struggle to satisfy safely. Hence the need for a lightweight solution that provides both strong isolation and nested Docker.
What Makes Micro VMs Fast?
Traditional VMs take 30 to 60 seconds to boot, while Docker's micro VM boots in just 1.3 to 3 seconds—nearly as fast as a container. This is thanks to three design choices: it directly loads the current kernel, skipping firmware and bootloaders; it emulates only 13 simple virtual devices instead of a pile of "fake" PC components; and its OS runs just one tiny program that is up and running 0.15 seconds after boot. This speed lets developers create, stop, and destroy sandboxes as quickly as they would containers.
Micro VMs and the Unikernel Approach
A micro VM is a form of virtual machine that shortens boot time and reduces resource consumption by trimming virtualization components. Its core idea is to remove the many emulated devices (such as BIOS, graphics cards, disk controllers) and unnecessary firmware boot stages found in traditional PC virtualization, keeping only the minimal device set needed to run the target workload. Docker Sandboxes directly loads the current kernel, emulates only 13 virtual devices, and has the OS run just one tiny program—approaches consistent with the philosophy of lightweight virtualization technologies like unikernels and Firecracker: trading virtualization hardware boundaries for near-container boot speed. Compared with full VMs, micro VMs sacrifice generality and some device compatibility but gain second-level or even sub-second boot times, making them suitable for temporary, short-lived agent sandbox scenarios.
How Are the Security Boundaries Built?
Docker designed multiple "walls" for the sandbox to protect your host. On the filesystem side, only the directory you specify is shared with the sandbox; the agent has full access to it but cannot see any other files. On login credentials, the agent never sees real tokens. When you log in to services like Claude, the real token stays on the host, and the sandbox only receives a fake token that is properly shaped but invalid. All outbound requests must pass through a proxy program on the host, which secretly swaps in the real token.
On the network side, the sandbox cannot directly access the internet by default. You can set network policies: open, balanced, or locked down. Balanced mode uses an allowlist of about 200 sites—only addresses on the list can be accessed. You can adjust the policy at any time via commands, or even view network request history in real time through a TUI interface.

Token Proxy and Network Allowlist
A token proxy is a mechanism that intercepts and rewrites requests outside the sandbox. The AI agent inside the sandbox only sees a properly shaped but invalid fake token, while the real credentials remain on the host machine; when the agent makes an outbound request, the request first reaches the proxy program on the host, which replaces it with the real token before forwarding. This way, even if the agent is tricked into leaking the token, what leaks is an invalid value. The network allowlist, based on default-deny, only permits about 200 predefined sites—balanced mode relies on this list. The allowlist works together with the token proxy to both limit the range of external services the agent can access and ensure only approved destinations receive real credentials, thereby constraining the agent's network behavior even when it has considerable autonomy.
In Practice: From Installation to Running
Using Docker Sandboxes doesn't require Docker Desktop or Docker Engine. On Mac you need Apple Silicon chips, on Ubuntu you need KVM, and on Windows you need to enable the Hypervisor Platform. After installation, create a directory as the agent's workspace, then run one command to start the sandbox:
sbx run --name my-first-vm claude .
This command creates a sandbox named my-first-vm, uses the Claude kit, and shares the current directory with it. The first launch requires downloading the image; after a short wait, you'll enter the Claude Code interface. By default, Claude Code inside the sandbox runs in "bypass permissions" mode, because Docker considers the sandbox itself to be the boundary and sees no need for additional approval prompts.
After you exit, the sandbox doesn't stop immediately. You can check its status with sbx ls, or stop it manually with sbx stop. Sandboxes stop automatically—they shut down after a period of idle time—but you can use the -d parameter to keep them running in the background.
Beyond Claude: Kits and the Ecosystem
Docker Sandboxes supports multiple "kits"—preconfigured templates that include images, tools, network rules, and login information. Besides Claude, you can choose Codex, Cursor, Hermes, or even a basic shell. Docker Hub has more community kits, such as the recently popular Anti-Gravity. Each kit is essentially a folder containing a Dockerfile and YAML files, and you can absolutely create your own—though the kit feature is still experimental.

Caveats and Limitations
Despite its clever design, Docker Sandboxes still has some things to watch out for. Is the shared directory in "clone mode" by default? No—the default is full access mode, where the agent can modify any file in the directory. Using the --clone parameter enables clone mode, where the agent's commits don't affect your Git history—but unpushed commits are lost when the sandbox is deleted. SSH forwarding is enabled by default, allowing agent processes to request signing and thereby log in to remote servers as you—fortunately, the network proxy still restricts it to only addresses on the allowlist.
Local MCP servers run outside the sandbox with powerful capabilities, and Docker's sandbox boundary doesn't cover them—use them at your own risk. Additionally, although micro VMs are lightweight, they still have their own kernel and image cache, so resource overhead is greater than containers. The cloud sandbox feature (via the --cloud parameter) has also been released, but it isn't free.

Containers vs. Virtual Machines: How to Choose?
Containers aren't obsolete. For short-lived tasks, high-density deployments, packaging applications, and running code you trust, containers remain the first choice. Docker Sandboxes suits the scenario of giving an AI agent its own independent computer to explore freely without affecting the host. As for traditional full-size VMs, they remain irreplaceable when you need to run infrastructure (like Docker hosts). Micro VMs are better suited for temporary, isolated agent workspaces.
Docker's move may seem contradictory, but it's actually a precise response to development needs in the AI era. When agents become part of the development workflow, providing them with a safe, fast, and independent runtime environment may well be the container company's next major growth area.
One-line Summary
Docker launches Sandboxes micro VMs designed for AI agents, combining VM isolation with container speed.
Paragraph Summary
Docker has launched Sandboxes micro VMs, providing independent runtime environments specifically for AI coding agents like Claude Code, Codex, and Cursor. Each sandbox has its own kernel, filesystem, and network stack, and comes with a built-in Docker engine, booting in just 1.3 to 3 seconds. Security is built through directory isolation, fake token proxies, and network allowlists to prevent agents from affecting the host. Users can start a sandbox with a single command and choose different kits. The article also points out risks such as full-access shared directories, SSH forwarding, and local MCP servers, and emphasizes that containers still dominate for short tasks and high-density scenarios, while micro VMs suit agent workflows that need independent environments.
Related articles

The CIA's Declassified 'Accidental Sabotage' Manual: How to Fight Power with Stupidity
A CIA sabotage manual declassified in 1976 teaches how 'carelessness' and playing dumb can stall systems: sweeping dust into parts, delaying, misspelling key words.

Datasette Agent: Practice and Observations on Analyzing SQLite Data with an AI Assistant
Introducing Datasette Agent, an AI assistant for SQLite data, covering its integration with Datasette Charts, its role in data analysis workflows, and query reliability and data security considerations for real-world use.

15 LLMs Put to the Test: Who's Quietly Disobeying Your Instructions?
An evaluation of 15 LLMs reveals "silent instruction overrides": models may quietly rewrite task objectives without informing users. This article analyzes the risks, evaluation blind spots, and offers actionable recommendations for developers.