|
2 | 2 | title: Get started with Docker Sandboxes |
3 | 3 | linkTitle: Get started |
4 | 4 | weight: 10 |
5 | | -description: Install the sbx CLI, configure credentials, and work through your first sandbox session. |
6 | | -keywords: sandbox, sbx, get started, install, credentials, clone mode, network policy |
| 5 | +description: Configure agent credentials and work through your first Docker Sandboxes session. |
| 6 | +keywords: sandbox, sbx, get started, credentials, clone mode, network policy |
7 | 7 | --- |
8 | 8 |
|
9 | 9 | Docker Sandboxes run AI coding agents in isolated microVM sandboxes. Each |
10 | 10 | sandbox gets its own Docker daemon, filesystem, and network — the agent can |
11 | 11 | build containers, install packages, and modify files without touching your host |
12 | 12 | system. |
13 | 13 |
|
14 | | -This page walks through your first session: install the CLI, run an agent in a |
15 | | -sandbox, see how the sandbox isolates it, control what it can reach on the |
16 | | -network, and clean up. |
| 14 | +This page walks through your first session: run an agent in a sandbox, see how |
| 15 | +the sandbox isolates it, control what it can reach on the network, and clean |
| 16 | +up. |
17 | 17 |
|
18 | 18 | ## Prerequisites |
19 | 19 |
|
20 | | -{{< tabs group="os" >}} |
21 | | -{{< tab name="macOS" >}} |
22 | | - |
23 | | -- macOS Sonoma (version 14) or later |
24 | | -- Apple silicon |
25 | | -- An API key or authentication method for the agent you want to use. Most agents |
26 | | - require an API key for their model provider (Anthropic, OpenAI, Google, and |
27 | | - others). See the [agent pages](agents/) for provider-specific instructions. |
28 | | - |
29 | | -{{< /tab >}} |
30 | | -{{< tab name="Windows" >}} |
31 | | - |
32 | | -- 64-bit Intel or AMD (x86_64) |
33 | | -- Windows 11 |
34 | | -- Windows Hypervisor Platform enabled. Open an elevated PowerShell prompt (Run |
35 | | - as Administrator) and run: |
36 | | - ```powershell |
37 | | - Enable-WindowsOptionalFeature -Online -FeatureName HypervisorPlatform -All |
38 | | - ``` |
39 | | -- An API key or authentication method for the agent you want to use. Most agents |
40 | | - require an API key for their model provider (Anthropic, OpenAI, Google, and |
41 | | - others). See the [agent pages](agents/) for provider-specific instructions. |
42 | | - |
43 | | -{{< /tab >}} |
44 | | -{{< tab name="Linux (Ubuntu)" >}} |
45 | | - |
46 | | -- Ubuntu 24.04 or later |
47 | | -- 64-bit Intel or AMD (x86_64) or 64-bit Arm (aarch64) |
48 | | -- KVM hardware virtualization supported and enabled by the CPU. If you're |
49 | | - running inside a VM, nested virtualization must be turned on. Verify that KVM |
50 | | - is available: |
51 | | - ```console |
52 | | - $ lsmod | grep kvm |
53 | | - ``` |
54 | | - A working setup shows `kvm_intel`, `kvm_amd`, `kvm_arm64`, or `kvm` in the output. If the output |
55 | | - is empty, run `kvm-ok` for diagnostics. If KVM is unavailable, `sbx` will |
56 | | - not start. |
57 | | -- Your user in the `kvm` group: |
58 | | - ```console |
59 | | - $ sudo usermod -aG kvm $USER |
60 | | - ``` |
61 | | - Log out and back in (or run `newgrp kvm`) for the group change to take effect. |
62 | | -- An API key or authentication method for the agent you want to use. Most agents |
63 | | - require an API key for their model provider (Anthropic, OpenAI, Google, and |
64 | | - others). See the [agent pages](agents/) for provider-specific instructions. |
65 | | - |
66 | | -{{< /tab >}} |
67 | | -{{< /tabs >}} |
68 | | - |
69 | | -If you run `sbx` in a virtual desktop infrastructure (VDI) environment, the |
70 | | -environment must support nested virtualization. |
71 | | - |
72 | | -Docker Desktop is not required to use `sbx`. |
73 | | - |
74 | | -## Install and sign in |
75 | | - |
76 | | -{{< tabs group="os" >}} |
77 | | -{{< tab name="macOS" >}} |
78 | | - |
79 | | -```console |
80 | | -$ brew trust docker/tap |
81 | | -$ brew install docker/tap/sbx |
82 | | -$ sbx login |
83 | | -``` |
84 | | - |
85 | | -{{< /tab >}} |
86 | | -{{< tab name="Windows" >}} |
87 | | - |
88 | | -```powershell |
89 | | -> winget install -h Docker.sbx |
90 | | -> sbx login |
91 | | -``` |
92 | | - |
93 | | -{{< /tab >}} |
94 | | -{{< tab name="Linux (Ubuntu)" >}} |
95 | | - |
96 | | -```console |
97 | | -$ curl -fsSL https://get.docker.com | sudo REPO_ONLY=1 sh |
98 | | -$ sudo apt-get install docker-sbx |
99 | | -$ sbx login |
100 | | -``` |
101 | | - |
102 | | -The first command adds Docker's `apt` repository to your system. |
103 | | - |
104 | | -{{< /tab >}} |
105 | | -{{< /tabs >}} |
106 | | - |
107 | | -If you need to install `sbx` manually, download a binary directly from the |
108 | | -[sbx-releases](https://github.com/docker/sbx-releases/releases) repository. |
109 | | - |
110 | | -`sbx login` opens a browser for Docker OAuth. |
111 | | - |
112 | | -> [!NOTE] |
113 | | -> See the [FAQ](faq.md) for details on why sign-in is required and what |
114 | | -> happens with your data. |
| 20 | +- [Install the `sbx` CLI](install.md) and sign in to Docker |
| 21 | +- Configure an authentication method for the agent you want to use. Most agents |
| 22 | + require an API key for their model provider. See the [agent pages](agents/) |
| 23 | + for provider-specific instructions. |
115 | 24 |
|
116 | 25 | ## Authenticate your agent |
117 | 26 |
|
|
0 commit comments