Last active
August 15, 2026 14:47
-
-
Save up1/da6756c44d14dd7a71b8c57fa1b39d35 to your computer and use it in GitHub Desktop.
Claude code with Docker Sandboxes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ณInstall in MacOS | |
| $brew trust docker/tap | |
| $brew install docker/tap/sbx | |
| # Login with Docker account | |
| $sbx login | |
| # ใช้งานกับ claude code และกำหนด network policy ของ sandboxes ได้เลย ขึ้นอยู๋กับความต้องการของเรา | |
| $cd <your project> | |
| $sbx run claude | |
| Initialize the global network policy for your sandboxes: | |
| Applies to all sandboxes, current and future — change it later with | |
| "sbx policy allow/deny/rm". Kits, including built-in agent kits, may | |
| also add per-sandbox rules. | |
| 1. Open — All network traffic allowed, no restrictions. | |
| ❯ 2. Balanced — Default deny, with common dev sites allowed. | |
| 3. Locked Down — All network traffic blocked unless you allow it. | |
| Use ↑/↓ or 1–3 to navigate, Enter to confirm, Esc to cancel. | |
| # สามารถ config policy ได้ | |
| $sbx policy reset | |
| $sbx policy allow network <host> | |
| $sbx policy deny network <host> | |
| $sbx policy rm network <host> | |
| # ทำการ downlod image เพื่อมาสร้าง container | |
| PREPARE IMAGE | |
| → pull docker/sandbox-templates:claude-code-docker | |
| ⠴ [████░░░░░░] 61.9 MB / 172.6 MB · 9/12 layers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # เริ่มต้นใช้งาน จะเป็น bypass permission on ให้เลย | |
| $sbx run claude | |
| Starting claude agent in sandbox 'claude-demo-sb'... | |
| ─────────────────────────────────────────────────────────────────────────────────────────────────── | |
| ❯ | |
| ─────────────────────────────────────────────────────────────────────────────────────────────────── | |
| ⏵⏵ bypass permissions on (shift+tab to cycle) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment