Join our Discord Server
Collabnix Team The Collabnix Team is a diverse collective of Docker, Kubernetes, and IoT experts united by a passion for cloud-native technologies. With backgrounds spanning across DevOps, platform engineering, cloud architecture, and container orchestration, our contributors bring together decades of combined experience from various industries and technical domains.

Docker Sandboxes is Now Available on Windows

2 min read

Discover Docker Sandboxes Now on Windows

Docker Sandboxes (sbx) now runs on Windows 11. Every sandbox is a Linux microVM with its own kernel, its own Docker Engine and a deny-by-default network. On Windows it runs on the Windows Hypervisor Platform. There is no WSL2 in the loop.

What you get inside a sandbox

ResourceWhat the sandbox gets
KernelIts own guest kernel, isolated from the host
Docker EngineA private Docker daemon inside the VM
FilesystemIts own root filesystem plus any mounted workspace
NetworkPrivate stack, deny-by-default egress through a host-side proxy

Prerequisites

RequirementDetail
OSWindows 11
CPU64-bit Intel or AMD (Windows on ARM is not supported for local sandboxes)
RuntimeWindows Hypervisor Platform optional feature enabled
FirmwareVT-x / AMD-V enabled in BIOS/UEFI

Does it need admin?

StepAdmin?
winget install -h Docker.sbx (per-user)No
Enable Windows Hypervisor PlatformYes, one time, plus a reboot
Daily sbx runNo

Step 1: Enable the Windows Hypervisor Platform (one time)

Open PowerShell as Administrator:

Enable-WindowsOptionalFeature -Online -FeatureName HypervisorPlatform -All

Reboot when asked. Note: this is not the Hyper-V role and not WSL2.

Rolling out with Intune / MDM? Let your tooling schedule the reboot:

# One-time, elevated, per machine
Enable-WindowsOptionalFeature -Online -FeatureName HypervisorPlatform -All -NoRestart

# Then, as the developer (no admin):
winget install -h Docker.sbx

Step 2: Install sbx (no admin)

winget install -h Docker.sbx

This installs to %LOCALAPPDATA%. No elevation needed.

Step 3: Sign in and store your model key

sbx login
sbx secret set anthropic

sbx secret set prompts for the key. Other providers work the same way:

sbx secret set openai
sbx secret set openrouter
sbx secret set google
sbx secret set xai

The key never enters the VM. The host proxy adds it to outbound HTTP headers.

Step 4: Pick a network policy

On first run, choose Balanced (deny by default, common developer sites allowed).

sbx policy
sbx policy ls

Need to reach a database on your LAN?

sbx policy allow network 10.0.0.5:5432

Step 5: Run your first sandbox

sbx run claude-code ~/my-project

Pick the template that matches your agent:

TemplateAgent inside
claude-codeClaude Code
claude-code-minimalClaude Code (no Node, Python, Go, Java)
codexOpenAI Codex
copilotGitHub Copilot CLI
cursor-agentCursor
devinDevin CLI
docker-agentDocker Agent
droidDroid
geminiGemini CLI
kiroKiro
opencodeOpenCode
shellNo agent, manual setup

Templates are Ubuntu-based and run as user agent (UID 1000, home /home/agent) with sudo.

Daily commands cheat sheet

# Lifecycle
sbx run opencode ~/my-project
sbx run --name feature opencode ~/proj
sbx run --name feature
sbx create --name scratch opencode
sbx ls
sbx stop my-sandbox
sbx rm my-sandbox

# Shell inside a sandbox
sbx exec -it my-sandbox bash

# Ports
sbx ports my-sandbox --publish 8080:3000
sbx ports my-sandbox

# Files
sbx cp ./config.json my-sandbox:/home/agent/workspace/
sbx cp my-sandbox:/home/agent/workspace/out.log ./

# Templates
sbx template save my-sandbox my-template:v1
sbx run -t my-template:v1 opencode

# Settings
sbx settings list
sbx settings set sandbox.disk.dockerVolume 30g
sbx daemon restart

Drive a project with sbxenv.yaml

Keep this file beside the project, not inside the mounted workspace:

schemaVersion: "1"
name: my-app
agent: opencode
workspace: ./app
env:
  NODE_ENV: development
  DATABASE_URL: postgres://alice:alice-strong-password@10.0.0.5:5432/alice_app
sandboxOptions:
  cpus: 4
  memory: 8g
  skills: readonly
ports:
  - sandbox: 3000
    host: 3000
sbx env plan   # preview what will be created
sbx env run    # create the sandbox and attach
sbx env rm     # destroy the environment

Isolation layers

  • Hypervisor: guest kernel separated from the host
  • Network: outbound TCP proxied and deny-by-default, UDP off, ICMP blocked, DNS through policy
  • Docker Engine: host daemon is unreachable
  • Workspace: mountless, clone or direct mount
  • Credentials: injected by the host proxy, never stored in the VM

Always blocked (not configurable): host files outside your workspace, the host Docker daemon, sandbox-to-sandbox traffic, and external ping.

What survives a restart?

ActionEffect
sbx runBoots the microVM and attaches you
Stop / startEverything inside the VM persists
sbx rmDeletes the sandbox and its contents

A directly mounted workspace lives on the host, so sbx rm does not delete your source code.

Sandboxes vs other options

ApproachIsolationDocker daemonBest for
Sandboxes (microVMs)Full hypervisorIsolated, in-VMAutonomous agents
Container + socket mountPartial (namespaces)Shared host daemonTrusted tools
Docker-in-DockerPartial (privileged)NestedCI/CD
Host executionNoneHost daemonManual dev

Clean up

sbx stop my-sandbox
sbx rm my-sandbox
sbx prune --dry-run   # see what would be removed
sbx prune
sbx template ls

No admin at all? Use the cloud

sbx --cloud

No local hypervisor needed. No host workspace mount, and compute is pay-as-you-go. The sbx CLI and local sandbox compute are free, including for commercial use.

Wrapping up

Enable one Windows feature once, install with winget, and every developer gets a private Linux microVM for their agents. Try the full hands-on lab at dockerworkshop.vercel.app.

Tip: sbx moves fast. Run sbx <cmd> --help to confirm flags on your installed version.

Have Queries? Join https://launchpass.com/collabnix

Collabnix Team The Collabnix Team is a diverse collective of Docker, Kubernetes, and IoT experts united by a passion for cloud-native technologies. With backgrounds spanning across DevOps, platform engineering, cloud architecture, and container orchestration, our contributors bring together decades of combined experience from various industries and technical domains.

Understanding AI Embeddings and Vector Search for Beginners

Explore the world of AI embeddings and vector search, learning how they transform massive data into actionable insights, driving intelligent systems.
Collabnix Team
9 min read
Join our Discord Server