---
title: "Why MicroVMs: The Architecture Behind Docker Sandboxes"
description: "Docker Sandboxes run each AI coding agent session in a dedicated microVM with its own kernel and a private Docker daemon, giving VM-grade isolation while still allowing docker build, run and compose without socket mounting or host privileges."
url: "https://swe.quest/articles/why-microvms-the-architecture-behind-docker-sandboxes-cc9095ea938dafa9"
canonical: "https://www.docker.com/blog/why-microvms-the-architecture-behind-docker-sandboxes/"
source: "Docker"
published: "2026-04-16"
difficulty: "easy"
kind: "Announcement"
reading_minutes: 5
tags: ["sandboxing","virtualization","ai-agents","containers"]
---

# Why MicroVMs: The Architecture Behind Docker Sandboxes

A post on [Docker](https://swe.quest/sources/docker.md), published 2026-04-16, 5 min read, Announcement. Original: [https://www.docker.com/blog/why-microvms-the-architecture-behind-docker-sandboxes/](https://www.docker.com/blog/why-microvms-the-architecture-behind-docker-sandboxes/)

## Summary

Docker Sandboxes run each AI coding agent session in a dedicated microVM with its own kernel and a private Docker daemon, giving VM-grade isolation while still allowing docker build, run and compose without socket mounting or host privileges. Full VMs are too slow for ephemeral sessions, containers force privileged Docker-in-Docker, and WASM/V8 isolates offer weaker isolation and no real OS environment. Because Firecracker is Linux/KVM-only, Docker built a new cross-platform VMM on Hypervisor.framework, Windows Hypervisor Platform and KVM to get fast cold starts on developer laptops. File, network and secret policies are set by infrastructure before the agent runs, with credentials injected from outside the VM boundary.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Sandboxing & isolation](https://swe.quest/tags/sandboxing.md) (Security)
- [Virtualization](https://swe.quest/tags/virtualization.md) (Infrastructure)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Containers](https://swe.quest/tags/containers.md) (Infrastructure)

## Prerequisites

- virtual machines vs containers ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))
- Docker basics ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))

## Keywords

Docker Sandboxes, microVM, Firecracker, Hypervisor.framework, Windows Hypervisor Platform, KVM, Docker-in-Docker

## Related posts

- [Why AI Agents Need Isolation](https://swe.quest/articles/why-ai-agents-need-isolation-2e7b1a6342af3236.md): Docker · 2026-07-01 · Easy · 9 min read · Sandboxing & isolation, AI agents, Virtualization, Containers, AI for coding
  AI coding agents that run commands, install packages and handle credentials should execute behind an isolation boundary rather than directly on the developer's host.
- [Docker Sandboxes vs. Containers: Choosing the Right Isolation for AI Agents](https://swe.quest/articles/docker-sandboxes-vs-containers-choosing-the-right-isolation-for-ai-agents-9c74485ae65a1b1c.md): Docker · 2026-11-06 · Medium · 14 min read · Sandboxing & isolation, AI agents, Containers, Virtualization, Security
  Containers are isolated processes sharing the host kernel. Docker Sandboxes are microVMs with their own kernel, filesystem, network and private Docker Engine, designed for autonomous coding agents that accumulate state for hours and act on untrusted instructions.
- [Comparing Different Approaches to Sandboxing](https://swe.quest/articles/comparing-different-approaches-to-sandboxing-650a4a9c7bb4484a.md): Docker · 2026-05-07 · Easy · 7 min read · Sandboxing & isolation, AI agents, Virtualization, Containers, Linux
  AI agents need strong isolation because hallucinations and prompt injection can lead to destructive commands, and the common sandboxing options trade isolation against cost. chroot isolates only the filesystem and can be escaped by root processes. systemd-nspawn adds process and network isolation but is Linux-only.
- [Building AI Teams: How Docker Sandboxes and Docker Agent Transform Development](https://swe.quest/articles/building-ai-teams-how-docker-sandboxes-and-docker-agent-transform-development-50a60f5e32d42807.md): Docker · 2026-03-11 · Medium · 9 min read · AI agents, Sandboxing & isolation, Containers, AI for coding, Virtualization
  Docker Agent defines teams of specialized AI agents in YAML, where a root "product manager" agent delegates to designer, engineer, QA and fixer sub-agents, each with its own model, instructions and toolsets (filesystem, shell, think, todo, memory, MCP).
- [The Untrusted Autonomous Workload: How AI Coding Agents Reshape What Isolation Has to Do](https://swe.quest/articles/the-untrusted-autonomous-workload-how-ai-coding-agents-reshape-what-isolation-af433bee97ff8809.md): Docker · 2026-05-26 · Medium · 16 min read · Sandboxing & isolation, Virtualization, AI agents, Containers, Supply chain security
  AI coding agents are untrusted, autonomous workloads that containers were never designed to isolate, so Docker Sandboxes runs each agent in a microVM (custom VMM on Hypervisor.framework, WHP or KVM) with its own kernel and private Docker Engine.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
