11---
2- title : Configure Claude Code
3- description : Learn how to configure Claude Code authentication, pass CLI options, and customize your sandboxed agent environment with Docker.
4- weight : 30
2+ title : Claude Code sandbox
3+ description : |
4+ Use Claude Code in Docker Sandboxes with authentication, configuration, and
5+ YOLO mode for AI-assisted development.
6+ keywords : docker, sandboxes, claude code, anthropic, ai agent, authentication, configuration
7+ weight : 10
58---
69
710{{< summary-bar feature_name="Docker Sandboxes" >}}
811
912This guide covers authentication, configuration files, and common options for
1013running Claude Code in a sandboxed environment.
1114
15+ Official documentation: [ Claude Code] ( https://code.claude.com/docs )
16+
1217## Quick start
1318
1419To create a sandbox and run Claude Code for a project directory:
@@ -42,8 +47,7 @@ This starts Claude and immediately processes the prompt.
4247
4348## Authentication
4449
45- Claude Code requires an Anthropic API key. Credentials are scoped per sandbox
46- and must be provided through environment variables or interactive login.
50+ Claude Code requires an Anthropic API key. Credentials are scoped per sandbox.
4751
4852### Environment variable (recommended)
4953
@@ -85,7 +89,7 @@ When using interactive authentication:
8589- Authentication sessions aren't persisted outside the sandbox
8690- No fallback authentication methods are used
8791
88- To avoid repeated authentication, use the ` ANTHROPIC_API_KEY ` environment variable method described above .
92+ To avoid repeated authentication, set the ` ANTHROPIC_API_KEY ` environment variable.
8993
9094## Configuration
9195
@@ -104,28 +108,13 @@ For example:
104108$ docker sandbox run < sandbox-name> -- --continue
105109```
106110
107- See the [ Claude Code CLI reference] ( https://docs .claude.com/en/ docs/claude-code /cli-reference )
111+ See the [ Claude Code CLI reference] ( https://code .claude.com/docs/en /cli-reference )
108112for available options.
109113
110114## Base image
111115
112- The Claude Code sandbox template is a container image that runs inside the
113- sandbox VM. It includes:
114-
115- - Ubuntu-based environment with Claude Code
116- - Development tools: Docker CLI, GitHub CLI, Node.js, Go, Python 3, Git, ripgrep, jq
117- - Non-root ` agent ` user with sudo access
118- - Private Docker daemon for running additional containers
119-
120- Claude launches with ` --dangerously-skip-permissions ` by default in sandboxes.
121-
122- You can build custom templates based on ` docker/sandbox-templates:claude-code ` .
123- See [ Custom templates] ( templates.md ) for details.
116+ Template: ` docker/sandbox-templates:claude-code `
124117
125- ## Next steps
118+ Claude Code launches with ` --dangerously-skip-permissions ` by default in sandboxes.
126119
127- - [ Using sandboxes effectively] ( workflows.md )
128- - [ Custom templates] ( templates.md )
129- - [ Network policies] ( network-policies.md )
130- - [ Troubleshooting] ( troubleshooting.md )
131- - [ CLI Reference] ( /reference/cli/docker/sandbox/ )
120+ See [ Custom templates] ( ../templates.md ) to build your own agent images.
0 commit comments