Docker Setup¶
Complete Docker configuration for Cloud CLI with multi-provider support (Claude Code, Cursor CLI, Codex) and AWS Bedrock integration.
Architecture¶
┌────────────────────────────────────────────────────────────────────┐
│ Docker Container (Isolated) │
│ │
│ ┌─────────────────┐ │
│ │ Cloud CLI │ │
│ │ (port 3001) │ │
│ └────────┬────────┘ │
│ │ │
│ ├──► /root/.claude/ (Claude sessions) ◄── volume │
│ ├──► /root/.cursor/ (Cursor sessions) ◄── volume │
│ ├──► /root/.codex/ (Codex sessions) ◄── volume │
│ │ │
│ └──► /projects/ (all projects) ◄── volume │
│ ├── my-app/ │
│ ├── backend/ │
│ └── frontend/ │
│ │
│ Pre-installed CLI tools: │
│ - Claude CLI (@anthropic-ai/claude-code) │
│ - Cursor CLI (cursor.com) │
│ - Codex CLI (@openai/codex) │
│ - TaskMaster AI (task-master-ai) │
│ - AWS CLI v2 │
│ - Git │
│ │
│ AWS Credentials ◄── env vars │
└────────────────────────────────────────────────────────────────────┘
Features¶
- Maximum isolation — All providers only see
/projects - Multi-provider support — Claude, Cursor, and Codex sessions persist in separate volumes
- AWS Bedrock — No Anthropic API keys needed
- Multiple projects — Create and manage via UI
- Git clone built-in — Clone repositories directly from UI
- Cloudflare Tunnel — Secure remote access included
- TaskMaster AI — Pre-installed for task management
Quick Start¶
1. Configure Environment¶
Required settings in .env:
# AWS Bedrock Configuration
CLAUDE_CODE_USE_BEDROCK=1
AWS_REGION=eu-central-1
AWS_ACCESS_KEY_ID=your-access-key-id
AWS_SECRET_ACCESS_KEY=your-secret-access-key
# Project workspace (required for Docker)
WORKSPACES_ROOT=/projects
2. Build and Launch¶
# Build image
docker-compose build
# Start container
docker-compose up -d
# Check logs
docker-compose logs -f
3. Open UI¶
Note: Default port is 3007 (mapped to internal 3001). See Changing Port to customize.
Working with Projects¶
Create New Project via UI¶
- Open UI → "Create New Project"
- Select "New Workspace"
- Enter path:
/projects/my-app - Optional: add GitHub URL to clone
- Click "Create"
Project will be created inside Docker volume projects-data.
Import Existing Project¶
# Copy code into container
docker cp ./existing-project claude-code-ui:/projects/my-imported-project
# Then in UI: "Create New Project" → "Existing Workspace" → /projects/my-imported-project
Export Project from Container¶
Volume Configuration¶
The docker-compose.yml defines four persistent volumes:
| Volume | Container Path | Purpose |
|---|---|---|
claude-sessions |
/root/.claude |
Claude Code session history |
cursor-sessions |
/root/.cursor |
Cursor CLI session history |
codex-sessions |
/root/.codex |
Codex session history |
projects-data |
/projects |
All project files |
Model Configuration¶
Default models (EU Bedrock inference profiles):
# In .env or docker-compose.yml environment section
ANTHROPIC_DEFAULT_SONNET_MODEL=eu.anthropic.claude-sonnet-4-5-20250929-v1:0
ANTHROPIC_DEFAULT_OPUS_MODEL=eu.anthropic.claude-opus-4-5-20251101-v1:0
ANTHROPIC_DEFAULT_HAIKU_MODEL=eu.anthropic.claude-haiku-4-5-20251001-v1:0
Cloudflare Tunnel Setup¶
The docker-compose.yml includes a Cloudflare Tunnel service for secure remote access.
Configure Tunnel¶
- Create tunnel at Cloudflare:
- Visit Cloudflare Zero Trust Dashboard
-
Create a new tunnel and get credentials
-
Configure credentials:
-
Update config:
-
Restart containers:
Verification¶
Check AWS CLI¶
docker-compose exec claude-code-ui aws --version
docker-compose exec claude-code-ui aws bedrock list-foundation-models --region eu-central-1
Check Installed CLIs¶
# Claude CLI
docker-compose exec claude-code-ui claude --version
# Cursor CLI
docker-compose exec claude-code-ui cursor --version
# Codex CLI
docker-compose exec claude-code-ui codex --version
Check Volumes¶
# List volumes
docker volume ls | grep ccui
# Inspect volume
docker volume inspect ccui_projects-data
Test Project Creation¶
- Open http://localhost:3007
- "Create New Project" → "New Workspace"
- Path:
/projects/test-app - Verify project appears in list
- Start a session and ask AI to create a file
- Verify file was created:
Volume Management¶
Backup Projects¶
# Create backup
docker run --rm \
-v ccui_projects-data:/projects \
-v $(pwd):/backup \
alpine tar czf /backup/projects-backup.tar.gz /projects
Backup All Sessions¶
# Backup all session data
docker run --rm \
-v ccui_claude-sessions:/claude \
-v ccui_cursor-sessions:/cursor \
-v ccui_codex-sessions:/codex \
-v $(pwd):/backup \
alpine sh -c "tar czf /backup/sessions-backup.tar.gz /claude /cursor /codex"
Restore from Backup¶
# Restore projects
docker run --rm \
-v ccui_projects-data:/projects \
-v $(pwd):/backup \
alpine sh -c "cd / && tar xzf /backup/projects-backup.tar.gz"
Clean Volumes¶
# Stop containers
docker-compose down
# Remove volumes (WARNING: deletes all projects and sessions!)
docker volume rm ccui_projects-data ccui_claude-sessions ccui_cursor-sessions ccui_codex-sessions
Alternative: AWS Profile¶
If you prefer using AWS Profile instead of credentials in .env:
1. Uncomment in docker-compose.yml:¶
2. Set in .env:¶
Additional Configuration¶
Change Port¶
In docker-compose.yml:
Add Additional Tools¶
In Dockerfile before WORKDIR /app:
# Install additional tools
RUN apt-get update && apt-get install -y --no-install-recommends \
vim \
htop \
&& rm -rf /var/lib/apt/lists/*
Then rebuild:
Useful Commands¶
# Enter container shell
docker-compose exec claude-code-ui bash
# View logs
docker-compose logs -f
# View specific service logs
docker-compose logs -f claude-code-ui
# Stop all services
docker-compose down
# Full cleanup (including volumes)
docker-compose down -v
# Rebuild without cache
docker-compose build --no-cache
# Restart specific service
docker-compose restart claude-code-ui
Troubleshooting¶
Claude not connecting to Bedrock¶
# Check environment variables
docker-compose exec claude-code-ui env | grep AWS
# Check Bedrock access
docker-compose exec claude-code-ui aws bedrock list-foundation-models --region eu-central-1
Project not appearing in UI¶
# Check project exists
docker-compose exec claude-code-ui ls -la /projects
# Restart container
docker-compose restart claude-code-ui
Permission denied when creating project¶
Ensure WORKSPACES_ROOT=/projects is set in .env or docker-compose.yml environment section.
Container fails to start¶
# Check for build errors
docker-compose build
# Check container logs
docker-compose logs claude-code-ui
# Check if port is already in use
lsof -i :3007
Cloudflare Tunnel not working¶
# Check tunnel logs
docker-compose logs cloudflared
# Verify credentials file exists
ls -la cloudflared/credentials.json
# Verify config file
cat cloudflared/config.yml
Limitations¶
- All providers work only with projects in
/projects - No access to host filesystem (by design for security)
- AWS credentials need manual update when expired
- Cursor CLI requires projects to be initialized in the container