Skip to content

Commit 40760c0

Browse files
Merge pull request #3377 from jasonrandrews/new-content
Docker Sandbox (sbx) install guide
2 parents 8d7a85e + 2849776 commit 40760c0

1 file changed

Lines changed: 194 additions & 0 deletions

File tree

content/install-guides/sbx.md

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
---
2+
title: Docker Sandboxes (sbx)
3+
4+
draft: true
5+
6+
description: Install Docker Sandboxes (sbx) on macOS with Apple Silicon to run AI coding agents in isolated Arm Linux microVMs using Apple Virtualization.framework.
7+
8+
minutes_to_complete: 10
9+
10+
official_docs: https://docs.docker.com/ai/sandboxes/
11+
12+
additional_search_terms:
13+
- docker
14+
- sbx
15+
- sandbox
16+
- microvm
17+
- containers
18+
- apple silicon
19+
20+
author: Jason Andrews
21+
22+
test_images:
23+
test_maintenance: false
24+
25+
weight: 1
26+
tool_install: true
27+
multi_install: false
28+
multitool_install_part: false
29+
layout: installtoolsall
30+
---
31+
32+
Docker Sandboxes (`sbx`) is a standalone CLI from Docker for running AI coding agents in isolated microVMs. Each sandbox gets its own filesystem, network, and Docker daemon, so agents can install packages, modify files, and run containers without touching your host system.
33+
34+
{{% notice Note %}}
35+
`sbx` is not available on Arm Linux.
36+
{{% /notice %}}
37+
38+
On macOS with Apple Silicon, `sbx` uses Apple's Virtualization.framework to launch Arm Linux (Ubuntu) microVMs. Docker Desktop isn't required.
39+
40+
## Before you begin
41+
42+
You need:
43+
44+
- A Mac with Apple Silicon (M1 or later) running macOS Sonoma (version 14) or later.
45+
- A Docker Hub account to authenticate `sbx`.
46+
- [Homebrew](https://brew.sh/) installed.
47+
48+
## Install the sbx CLI
49+
50+
Install `sbx` using Homebrew:
51+
52+
```bash
53+
brew install docker/tap/sbx
54+
```
55+
56+
Homebrew installs the `sbx` binary at `/opt/homebrew/bin/sbx`.
57+
58+
## Verify the installation
59+
60+
Confirm that `sbx` is installed:
61+
62+
```bash
63+
sbx version
64+
```
65+
66+
{{% notice Note %}}
67+
The output below shows the version at the time this guide was written. Homebrew installs the latest available version. To find the latest release, see the [sbx releases page](https://github.com/docker/sbx-releases/releases).
68+
{{% /notice %}}
69+
70+
The output is similar to:
71+
72+
```output
73+
sbx version: v0.32.0 55580366449bcfebfc1787b9944284cf64c856d7
74+
```
75+
76+
## Authenticate with Docker Hub
77+
78+
Sign in to your Docker account:
79+
80+
```bash
81+
sbx login
82+
```
83+
84+
This outputs a one-time code and a URL. Open the link in a browser, sign in with your Docker Hub credentials, and approve the activation.
85+
86+
On your first login, the CLI asks you to select a network policy:
87+
88+
- Open: allows all network access from within the sandbox.
89+
- Balanced: allows common development services while blocking everything else.
90+
- Locked Down: blocks all outbound network traffic.
91+
92+
Balanced is a good starting point for most development workflows.
93+
94+
## Run a sandbox
95+
96+
Navigate to your project directory and launch an agent sandbox:
97+
98+
```bash
99+
sbx run claude
100+
```
101+
102+
Other supported agents include `copilot`, `codex`, and `kiro`. For the full list, see the [Docker Sandboxes agents documentation](https://docs.docker.com/ai/sandboxes/agents/).
103+
104+
## Start a shell sandbox
105+
106+
To start an agentless sandbox for manual exploration, use the `shell` agent:
107+
108+
```bash
109+
sbx run shell
110+
```
111+
112+
This launches a bare Arm Linux microVM with a shell prompt. No AI agent runs inside it.
113+
114+
## Confirm the sandbox runs Arm Linux
115+
116+
From within a shell sandbox, verify the operating system and architecture:
117+
118+
```bash
119+
uname -a
120+
```
121+
122+
The output is similar to:
123+
124+
```output
125+
Linux shell-arm-learning-paths 7.0.8 #1 SMP PREEMPT Thu Jun 4 20:59:42 UTC 2026 aarch64 GNU/Linux
126+
```
127+
128+
Check the Ubuntu release:
129+
130+
```bash
131+
cat /etc/os-release
132+
```
133+
134+
The output is similar to:
135+
136+
```output
137+
PRETTY_NAME="Ubuntu 26.04 LTS"
138+
NAME="Ubuntu"
139+
VERSION_ID="26.04"
140+
VERSION="26.04 (Resolute Raccoon)"
141+
VERSION_CODENAME=resolute
142+
ID=ubuntu
143+
ID_LIKE=debian
144+
HOME_URL="https://www.ubuntu.com/"
145+
SUPPORT_URL="https://help.ubuntu.com/"
146+
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
147+
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
148+
UBUNTU_CODENAME=resolute
149+
LOGO=ubuntu-logo
150+
```
151+
152+
This confirms the sandbox is running Arm Linux (Ubuntu on aarch64) inside the microVM.
153+
154+
## Basic sbx commands
155+
156+
Use these commands to manage your sandboxes after installation.
157+
158+
List all sandboxes, including their IDs and current status:
159+
160+
```bash
161+
sbx ls
162+
```
163+
164+
Start a stopped sandbox by its ID:
165+
166+
```bash
167+
sbx start <id>
168+
```
169+
170+
Stop a running sandbox:
171+
172+
```bash
173+
sbx stop <id>
174+
```
175+
176+
Remove a sandbox permanently:
177+
178+
```bash
179+
sbx rm <id>
180+
```
181+
182+
Copy a file from your Mac into a sandbox:
183+
184+
```bash
185+
sbx cp ./myfile.txt <id>:/home/user/myfile.txt
186+
```
187+
188+
Copy a file from a sandbox back to your Mac:
189+
190+
```bash
191+
sbx cp <id>:/home/user/output.txt ./output.txt
192+
```
193+
194+
You're now ready to use Docker Sandboxes to run AI agents in isolated microVMs on macOS.

0 commit comments

Comments
 (0)