---
title: "Docker vs. remote microVMs · airgap"
description: "Why local Docker containers are not a security boundary for AI coding agents, and how disposable remote microVMs with their own kernel differ."
url: https://www.useairgap.dev/guides/docker-vs-microvm
---

[All guides](https://www.useairgap.dev/guides)

# Docker vs. remote microVMs

Why local Docker containers are not a security boundary for AI coding agents, and how disposable remote microVMs with their own kernel differ.

## Docker vs. remote microVMs

**Why not just use local Docker?** Containers are an operational packaging boundary, not a security isolation boundary for untrusted AI-generated code. Local Docker containers share the host Linux kernel (or a single shared desktop VM kernel on macOS/Windows), frequently mount host project directories and environment variables, and expose the Docker daemon socket (`/var/run/docker.sock`), which grants immediate root-equivalent control over the host.

airgap runs every submitted command inside a single-use, disposable Linux microVM on GMI Cloud AgentBox v2. Each microVM boots with its own dedicated kernel, isolated memory space, and ephemeral root disk, completely separated from your workstation. When the command exits or times out, the entire microVM is permanently destroyed.

### Side-by-side security comparison

| Security dimension | Local Docker | airgap remote microVM |
| --- | --- | --- |
| Kernel isolation | Shared host kernel (container escape risk) | Dedicated isolated microVM kernel per run |
| Local daemon required | Yes (Docker Desktop / dockerd running locally) | None — single Rust binary or npx -y airgap-mcp |
| Host filesystem access | Bind mounts expose repo, .git, and .env files | Zero host mounts; only explicitly passed files leave host |
| Credential exposure | Easy to leak ~/.ssh, ~/.aws, or shell env vars | Host env and keys stay on your machine; output is scrubbed |
| Lifecycle & cleanup | Stopped containers and volumes linger until pruned | Automatically destroyed on exit, error, timeout, or cancel |
| Cross-OS parity | Differs across macOS, Windows, and Linux hosts | Identical Linux Bookworm microVM from any OS |

### What stays on your machine vs. what crosses the boundary

Only the explicit files and command in the MCP tool call leave your workstation. Your `~/.ssh` keys, cloud CLI profiles, browser sessions, and sibling repositories are never mounted or visible to the sandbox. Deployment templates (`airgap-{image}-{instance_type}`) cache only the public base image and start command — never your uploaded files.

### Honest boundaries: what airgap is not

airgap is not a physically air-gapped or offline environment. GMI sandboxes have outbound internet access (needed for `npm`, `pip`, `cargo`, and cloning GitHub PRs), and the files you explicitly pass leave your machine. Provider isolation, network egress policy, account authorization, and base image trust remain part of the security boundary. Pin container image digests when you need bit-for-bit repeatability, and never pass production secrets inside sandbox file snapshots.

## Keep reading

[All 12 guides](https://www.useairgap.dev/guides)

### [Stopping prompt injection RCE](https://www.useairgap.dev/guides/prompt-injection-rce)

Break the lethal trifecta before untrusted text can run.

### [Blocking malicious install scripts](https://www.useairgap.dev/guides/supply-chain-hardening)

postinstall, setup.py and build.rs hooks are refused by default.
