OpenSana Docs
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

  1. Export the required host environment variables.
  2. Create ~/.config/opensana on your host if it does not already exist.
  3. Open the repo in VS Code.
  4. Run Dev Containers: Reopen in Container.
  5. 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_REGION
  • CLAUDE_CODE_USE_BEDROCK
  • CLAUDE_CODE_MAX_OUTPUT_TOKENS
  • MAX_THINKING_TOKENS
  • DEVCONTAINER_NETWORK_MODE

Network Modes

The dev container supports two modes:

  • strict: enables the repo firewall and blocks outbound traffic by default
  • open: 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=open

Why 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.

On this page