Dev Container
Setup and Modes
Build the dev container, provide host environment variables, and choose between strict or open networking.
Prerequisites
Before using the dev container, make sure you have:
- Docker Desktop or a compatible container runtime
- VS Code with the Dev Containers extension
Quick Start
- Export the required host environment variables.
- Create
~/.config/opensanaon your host if it does not already exist. - Open the repo in VS Code.
- Run
Dev Containers: Reopen in Container. - Open a terminal inside the container and start the AI CLI you want to use.
Required Host Environment
For the current Bedrock-backed Claude Code flow:
export AWS_BEARER_TOKEN_BEDROCK=<your-aws-bearer-token>Optional variables include:
AWS_REGIONCLAUDE_CODE_USE_BEDROCKCLAUDE_CODE_MAX_OUTPUT_TOKENSMAX_THINKING_TOKENSDEVCONTAINER_NETWORK_MODE
Network Modes
The dev container supports two modes:
strict: enables the repo firewall and blocks outbound traffic by defaultopen: skips the firewall and allows normal outbound traffic
Set the mode on your host before opening or rebuilding the container:
export DEVCONTAINER_NETWORK_MODE=strict
# or
export DEVCONTAINER_NETWORK_MODE=openWhy The Container Helps
The container isolates:
- Linux-native dependencies in
/workspace/node_modules - AI CLI configuration and session state
- optional network access rules
That makes it a better fit for controlled AI execution than mixing everything into the host machine.