Docker Cloud Sandboxes: Why Agents Need MicroVMs, Not Containers
Docker put AI coding agents in hosted microVMs instead of containers, because a container was never the isolation boundary this job needed.
Key takeaways
- Docker Cloud Sandboxes run AI coding agents in hosted microVMs, each with its own kernel and Docker daemon, instead of containers that share the host kernel.
- They use the same sbx CLI and Kits as local sandboxes, bill compute per second, and expire after one hour by default.
- Use a microVM for any agent that runs generated code unattended.
On this page
AI agents need microVMs because a container shares the host kernel, and an agent's normal job (installing unknown packages, running code an LLM just wrote) looks exactly like an attack. Docker Cloud Sandboxes put each agent in a hosted microVM with its own kernel and Docker daemon, driven by the same sbx CLI as local sandboxes and billed per second.
Verified against
Docker Sandboxes sbx CLI 0.50.1 (cloud requires 0.45.0 or later), against the docs.docker.com Sandboxes overview, architecture, security and cloud pages, the Agentic Platform billing docs and the sbx release notes. Checked October 2026.
Docker launched Cloud Sandboxes at WeAreDevelopers World Congress North America in San Jose (September 23-25, 2026), letting agents like Claude Code run on Docker-managed compute instead of a developer's laptop. The detail that matters is not "cloud." It is that Docker decided a container was the wrong isolation primitive for this job in the first place, and is now selling the same microVM boundary as a metered service.
Containers were built for a cooperative tenant
A container isolates a process from its neighbors using namespaces and cgroups, all sitting on one shared kernel. That model assumes the thing inside is roughly cooperative: it runs the software you packaged, it does not try to escape, and if it does something unexpected, the blast radius is bounded by whatever kernel vulnerability happens to be live that week. An AI coding agent breaks that assumption on purpose. Its job is to install packages it has never seen, run scripts an LLM just generated, and make shell decisions no human pre-approved. That is not a misbehaving tenant; it is a tenant whose normal operation looks exactly like an attack. A shared-kernel boundary around that workload is a convenience feature, not a security one, the same conclusion our AI agent security guide reaches from the credential side rather than the kernel side.
What a microVM actually buys you
Docker's security docs describe a separate kernel per sandbox, with no shared memory or processes with the host, and call the microVM the primary trust boundary. Inside it the agent has full control, including sudo, but can reach only what is explicitly shared. Each sandbox also keeps its own Docker daemon state, image cache and package installs, so one agent's docker build never touches another's layers. The boundary moves from "a kernel feature that separates processes" to "hardware virtualization that separates machines."
The network and credential layers sit outside the VM. Outbound TCP goes through a host-side proxy that enforces network policy, and that proxy injects authentication headers on the way out, so raw credential values never enter the microVM. Stopping and restarting a sandbox does not recreate its VM; sbx rm deletes it and its contents. Startup speed is what makes this usable at all: a VM that takes ten seconds to boot is fine for a CI runner and painful for a loop where the agent spins up, tests an idea, and tears down a dozen times an hour.
The cloud part is the boring, correct part
Cloud Sandboxes are not a different security model from Docker's local sandboxes, which is the actual selling point. Same CLI, same isolation model, same Kits, just running on Docker-managed compute instead of whatever your laptop happens to have free. Local and cloud sandboxes keep separate credentials, network policies and lifecycle controls. The practical win is continuity: an agent chewing through a long migration or a large test matrix does not stop when you close the lid. You need an active Docker Agentic Platform subscription and sbx 0.45.0 or later, then add the global --cloud flag:
sbx login
sbx --cloud create --name cloud-project --allow-network github.com:443 claude
sbx --cloud exec cloud-project git clone https://github.com/docker/welcome-to-docker.git /home/agent/workspace/project
sbx --cloud attach cloud-project
sbx --cloud ls
Note the --allow-network flag on creation. The interesting control here isn't the VM boundary at all: network access is declared per sandbox up front, which matters once you remember that an agent inside even a perfectly isolated VM can still misuse whatever access it is granted. The proxy keeps the raw token out of the VM, but it will still sign the agent's requests to every host you allowed.
Kits are the part that outlives this product
Docker defines a Kit as an OCI image containing the agent and its tools, together with declarations of the access it needs. That's a bigger decision than it sounds. A Kit builds, pushes, pulls, scans and pins by digest with ordinary image tooling, and the same Kit runs locally or in the cloud, with credentials and policies configured separately for each. Docker published the Sandbox Kit spec under Apache 2.0 and has committed to bringing it to the CNCF for neutral governance, though as of October 2026 that is a commitment, not an accepted project. That is the tell that Docker wants "package an agent and its guardrails as one artifact" to become ecosystem infrastructure, the way OCI itself stopped being a Docker-only concern years ago. If that lands, the access rules baked into a Kit become auditable and transferable, exactly the property the industry was missing when Plugin4Shell showed that a pinned reference nobody verifies is not a control at all.
The bill arrives by the second, and that changes how you use it
Docker's billing docs say cloud compute is pay-as-you-go with no recurring subscription fee, metered per second based on runtime and the sandbox's CPU and memory configuration. Model-provider inference is billed separately by your provider. That pricing shape nudges behavior in a useful direction: there is little reason to leave a large sandbox idle between agent turns. The tradeoff is state. Cloud sandboxes expire after one hour by default; resumable ones are stopped and the rest are deleted. Pull out whatever the agent produced (sbx --cloud cp exists for that) before the timer runs out, because the point of per-second billing is that you don't pay for a VM sitting there holding your work.
Questions people ask
What is the difference between a Docker sandbox and a container?
A container shares the host's kernel and relies on namespaces and cgroups for isolation. A Docker Sandbox is a microVM with its own kernel and its own Docker daemon, so code inside it cannot reach the host's processes or memory. Network traffic and credentials pass through a host-side proxy that enforces policy. Use containers for trusted workloads and sandboxes for agents running generated code.
How much do Docker Cloud Sandboxes cost?
The sbx CLI and local sandboxes are free, including for commercial use. Cloud sandboxes need a Docker Agentic Platform subscription and are billed pay-as-you-go, per second, based on runtime and CPU and memory configuration, with no recurring subscription fee as of October 2026. Check the Usage and billing page in Docker's console for current per-size rates. Model inference is billed separately.
How long can a Docker Cloud Sandbox run?
Cloud sandboxes expire after one hour by default. When one expires, a resumable sandbox is stopped and any other sandbox is deleted along with its contents. Copy results out with sbx --cloud cp or push them to a remote repository before expiry, and design long agent jobs to checkpoint their work rather than assuming the VM will still exist.
The decision, concretely
- Running an agent that only edits files in a repo you already trust? A container is still fine; you don't need a microVM to isolate a typing assistant.
- Running an agent that installs arbitrary dependencies or executes code it just generated? Use a sandboxed microVM, local or cloud, same as running AI CLI agents in a CI pipeline already assumes for the credential side of this problem. GitHub reached a similar conclusion locally with Copilot CLI sandboxing.
- Need the agent to keep working after your laptop closes, or need to fan out parallel runs? Cloud Sandboxes is the right shape, because the isolation model does not change when you move off your hardware.
- Packaging an agent's environment for your team or for distribution? Build it as a Kit now rather than a bespoke Dockerfile, so you are not rewriting it if the CNCF effort standardizes the format.
The call we'd make
Treat the microVM boundary as the default for anything that runs model-generated code unattended, and treat the cloud offering as a convenience on top of a security decision Docker had already made locally, not a new one. The part worth watching is the Kit spec's path through CNCF, because that decides whether "package the agent and its guardrails together" becomes something every vendor implements the same way, or stays another proprietary wrapper with better marketing. Until then, build Kits like any OCI image you intend to keep using after the vendor that invented them changes its mind.
Sources
Cite this article
Kiril Urbonas (2026). Docker Cloud Sandboxes: Why Agents Need MicroVMs, Not Containers. DevOpsNess. Updated 2026-11-15. https://www.devopsness.com/blog/docker-cloud-sandboxes-ai-agent-isolation
[Docker Cloud Sandboxes: Why Agents Need MicroVMs, Not Containers](https://www.devopsness.com/blog/docker-cloud-sandboxes-ai-agent-isolation) (Kiril Urbonas, DevOpsNess, updated 2026-11-15)
More from DevOps
Explore more articles in this category
Chef vs Puppet vs Ansible: Configuration Management in 2026
One is agentless and Python-based, the other two run a persistent agent and a domain-specific language. The architecture difference matters more than the syntax.
Canary Releases: Gradual Rollout Strategy
We've run canary deploys on most services for two years. The mechanics are easy; the metrics that decide "promote or roll back" are where the design is.
GitHub Actions Self-Hosted Runners: Why We Switched and What Broke
Bills hit $3,400/mo for runner minutes. We moved to self-hosted on EKS spot. The savings were real; the surprises were too.
You might have missed
Evergreen posts worth revisiting.