Summary
Add support for additional environment variables to enhance configuration flexibility and align with Claude CLI's official environment variable support.
Motivation
Currently, our Docker wrapper only handles basic authentication mounting but doesn't expose the full range of environment variables that Claude CLI supports. This limits configurability and forces users to work around missing environment controls.
Proposed Environment Variables
Configuration Management
CLAUDE_CONFIG_DIR - Override default config directory location
NODE_ENV - Environment detection for different behaviors
USER_TYPE - User classification controls
CI - CI environment detection for automation-friendly behavior
Authentication & API
ANTHROPIC_API_KEY_OVERRIDE - Override mechanism for API keys
ANTHROPIC_AUTH_TOKEN - Alternative authentication method
ANTHROPIC_BASE_URL - Custom endpoint configuration
ANTHROPIC_MODEL - Default model selection
API_TIMEOUT_MS - Request timeout configuration
Cloud Provider Integration
CLAUDE_CODE_USE_BEDROCK - AWS Bedrock toggle
CLAUDE_CODE_USE_VERTEX - Google Vertex AI toggle
CLOUD_ML_REGION - Cloud region specification
VERTEX_REGION_CLAUDE_ - Vertex region prefix
Feature Toggles
DISABLE_PROMPT_CACHING - Cache control
DISABLE_BINARY_FEEDBACK - Feedback system control
FORCE_BINARY_FEEDBACK - Force feedback mode
MAX_THINKING_TOKENS - Token limits
THINK_TOOL - Enable thinking tool
USE_BUILTIN_RIPGREP - Ripgrep preference
USE_STAGING_OAUTH - OAuth environment selection
Implementation
- Update
claude.sh to pass through these environment variables to the Docker container
- Update
Dockerfile to ensure environment is properly configured
- Add documentation to README about supported environment variables
- Add examples showing how to use environment-based configuration
Benefits
- Better CI/CD integration with
CI and NODE_ENV detection
- Flexible config directory placement with
CLAUDE_CONFIG_DIR
- Enhanced cloud provider configuration
- Fine-grained feature control
- Improved timeout and caching controls
Summary
Add support for additional environment variables to enhance configuration flexibility and align with Claude CLI's official environment variable support.
Motivation
Currently, our Docker wrapper only handles basic authentication mounting but doesn't expose the full range of environment variables that Claude CLI supports. This limits configurability and forces users to work around missing environment controls.
Proposed Environment Variables
Configuration Management
CLAUDE_CONFIG_DIR- Override default config directory locationNODE_ENV- Environment detection for different behaviorsUSER_TYPE- User classification controlsCI- CI environment detection for automation-friendly behaviorAuthentication & API
ANTHROPIC_API_KEY_OVERRIDE- Override mechanism for API keysANTHROPIC_AUTH_TOKEN- Alternative authentication methodANTHROPIC_BASE_URL- Custom endpoint configurationANTHROPIC_MODEL- Default model selectionAPI_TIMEOUT_MS- Request timeout configurationCloud Provider Integration
CLAUDE_CODE_USE_BEDROCK- AWS Bedrock toggleCLAUDE_CODE_USE_VERTEX- Google Vertex AI toggleCLOUD_ML_REGION- Cloud region specificationVERTEX_REGION_CLAUDE_- Vertex region prefixFeature Toggles
DISABLE_PROMPT_CACHING- Cache controlDISABLE_BINARY_FEEDBACK- Feedback system controlFORCE_BINARY_FEEDBACK- Force feedback modeMAX_THINKING_TOKENS- Token limitsTHINK_TOOL- Enable thinking toolUSE_BUILTIN_RIPGREP- Ripgrep preferenceUSE_STAGING_OAUTH- OAuth environment selectionImplementation
claude.shto pass through these environment variables to the Docker containerDockerfileto ensure environment is properly configuredBenefits
CIandNODE_ENVdetectionCLAUDE_CONFIG_DIR