Complete containerized development environment with VS Code Server, AI tools, and language support.Cloud development container with VS Code Server, multiple languages, and AI coding tools.
bash
cp .env.example .env```
Layers:
make up2. 10-languages - Node.js, Python, Go, Rust
- 20-vscode - VS Code Server (code-server)
Open browser: http://localhost:8080
### Build All Layers
**That's it!** You now have a complete development environment.
```bash
---cd docker
## Contents# Build all layers in correct order (REQUIRED)
make build-all
- [Architecture](#architecture)```
- [Configuration](#configuration)
- [Usage](#usage)**Note:** You must use `make build-all` because the layers must be built sequentially. Plain `docker compose build` won't work due to layer dependencies.
- [Production Deployment](#production-deployment)
- [Advanced Topics](#advanced-topics)### Run Locally
---```bash
# Start the workspace
## Architecturemake up
### Layer Structure# Or use docker compose directly
docker compose up -d workspace
00-base → Ubuntu + essential tools + dev8 user# Access:
10-languages → Go, Python, Node.js, Rust# - VS Code: http://localhost:8080 (password: dev8dev)
20-vscode → code-server (VS Code in browser)# - SSH: ssh -p 2222 dev8@localhost
30-ai-tools → GitHub Copilot, AI CLI tools
make logs
Each layer builds on the previous, allowing efficient caching.
# Stop
### Servicesmake down
-
VS Code Server (port 8080): Browser-based VS Code
-
SSH (port 2222): Optional shell access### Environment Variables
-
Supervisor API (port 9000): Workspace monitoring
Create a .env file in the docker/ directory:
dev8-data: Single persistent volume containing:- User home directory (
/home/dev8) - configs, packages, extensions - Workspace subdirectory (
/home/dev8/workspace) - your code and projects
- User home directory (
# Required
---# Optional
CODE_SERVER_PASSWORD=your_password
## ConfigurationANTHROPIC_API_KEY=sk-ant-xxx...
OPENAI_API_KEY=sk-xxx...
### Environment VariablesGEMINI_API_KEY=xxx...
Required:
GITHUB_TOKEN=ghp_xxxxx # GitHub token for Copilot
```Everything in `/home/dev8` persists across container restarts:
**Optional:**```
```bash/home/dev8/
# Authentication (default: none)├── .sdkman/ # Java, Kotlin, Scala (sdk install ...)
CODE_SERVER_AUTH=none # or 'password'├── .linuxbrew/ # Ruby, PostgreSQL (brew install ...)
CODE_SERVER_PASSWORD= # set if auth=password├── .npm/ # Node packages (npm install -g ...)
├── .local/ # Python packages (pip install --user ...)
# SSH (optional)├── .cargo/ # Rust packages (cargo install ...)
SSH_PASSWORD= # simple password auth└── .vscode-server/ # VS Code extensions
SSH_PUBLIC_KEY= # or public key auth```
# Git identity**Examples:**
GIT_USER_NAME=Your Name```bash
GIT_USER_EMAIL=you@example.com# Install Java
sdk install java 17.0.8-amzn
# AI API keys (optional)
ANTHROPIC_API_KEY=# Install Ruby
OPENAI_API_KEY=brew install ruby
GEMINI_API_KEY=
```# Install Node package
npm install -g typescript
### Security Notes
# Install Python package
- **Default**: No authentication (suitable for local development)pip install --user pytest
- **Production**: Set `CODE_SERVER_AUTH=password` and strong password
- **SSH**: Not required for VS Code access; only enable if needed# All persist in /home/dev8 volume!
gh copilot suggest "create a REST API in Node.js"
# Start workspace```
make up
### AI APIs (if configured)
# View logs- Anthropic Claude API
make logs- OpenAI API
- Google Gemini API
# Stop workspace
make downSetup scripts in `/usr/local/share/ai-tools/`
# Rebuild after changes## � Services
make rebuild
```| Service | Port | Purpose |
|---------|------|---------|
### Accessing the Workspace| VS Code Server | 8080 | Web-based VS Code |
| SSH Server | 2222 | Terminal access |
**VS Code (Primary):**| Workspace Supervisor | 9000 | Monitoring |
- URL: http://localhost:8080
- No password required (default)## � Directory Structure
**SSH (Optional):**```
```bashdocker/
# If SSH_PASSWORD is set├── images/
ssh -p 2222 dev8@localhost│ ├── 00-base/ # Base system + SDKMAN + Homebrew
│ ├── 10-languages/ # Node, Python, Go, Rust
# If SSH_PUBLIC_KEY is set│ ├── 20-vscode/ # VS Code Server
ssh -p 2222 -i ~/.ssh/your_key dev8@localhost│ └── 30-ai-tools/ # AI CLI tools
```├── shared/
│ ├── config/ # Shared configs
### Common Tasks│ └── scripts/ # Helper scripts
├── docker-compose.yml # Local development
**View running containers:**├── Makefile # Build shortcuts
```bash└── README.md # This file
docker compose ps```
Execute command in container:
docker exec -it dev8-workspace bash
``````bash
make build-base
**Check container health:**make build-languages
```bashmake build-vscode
docker compose logs workspace | tail -50make build-ai-tools
---### Test
Quick Deploy:# Check services
# 1. Configure production environment
cp .env.prod.example .env.prod# View logs
# Edit .env.prod with your Azure settingsdocker compose logs -f workspace
make prod-build### Clean Up
make prod-push
# 3. Deploy to ACIdocker compose down -v # Remove containers and volumes
make prod-deploymake clean # Remove images
make prod-status## � Documentation
- **ARCHITECTURE.md** - Architecture decisions and design
### Production Configuration- **CONTAINER_CAPABILITIES.md** - What the container can do
- **CHANGELOG.md** - Version history
**Key differences from development:**
- Use pre-built images (no build context)## 📄 License
- Azure Files for persistence
- Resource limits enforcedPart of Dev8.dev - See [LICENSE](../LICENSE)
- Authentication recommended
**Environment setup:**
```bash
# Required
ENVIRONMENT_ID=dev8-prod-001
GITHUB_TOKEN=ghp_xxxxx
CONTAINER_REGISTRY=yourregistry.azurecr.io
AZURE_STORAGE_ACCOUNT=youraccount
AZURE_STORAGE_KEY=xxxxx
# Recommended
CODE_SERVER_AUTH=password
CODE_SERVER_PASSWORD=$(openssl rand -base64 32)
Deploy script:
./deploy-to-aci.shSee Production Deployment Details below.
# Build individual layers (in order)
docker compose build base
docker compose build languages
docker compose build vscode
docker compose build workspaceDisable authentication:
CODE_SERVER_AUTH=noneEnable password protection:
CODE_SERVER_AUTH=password
CODE_SERVER_PASSWORD=your_secure_passwordSSH with password:
SSH_PASSWORD=your_ssh_passwordSSH with public key:
SSH_PUBLIC_KEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA..."Container won't start:
# Check logs
docker compose logs workspace
# Check environment
docker exec dev8-workspace env
# Restart
make rebuildPort conflicts:
# Change ports in docker-compose.yml
ports:
- "8081:8080" # VS Code on 8081 insteadVolume issues:
# List volumes
docker volume ls
# Inspect volume
docker volume inspect dev8-workspace
# Clean rebuild
make clean
make up-
Azure Container Registry (ACR)
az acr create --name yourregistry --resource-group yourgroup --sku Basic
-
Azure Storage Account
az storage account create --name yourstorage --resource-group yourgroup
-
Azure File Share
# Create single file share for all persistent data (home + workspace) az storage share create --name dev8-data --account-name yourstorage --quota 200
1. Build production image:
docker build -t yourregistry.azurecr.io/dev8-workspace:latest -f images/30-ai-tools/Dockerfile .2. Push to registry:
az acr login --name yourregistry
docker push yourregistry.azurecr.io/dev8-workspace:latest3. Deploy using script:
./deploy-to-aci.shOr manually:
az container create \
--resource-group yourgroup \
--name dev8-workspace \
--image yourregistry.azurecr.io/dev8-workspace:latest \
--cpu 2 --memory 4 \
--ports 8080 2222 9000 \
--environment-variables \
GITHUB_TOKEN=ghp_xxxxx \
CODE_SERVER_AUTH=password \
CODE_SERVER_PASSWORD=xxxxx- Set strong passwords (use
openssl rand -base64 32) - Configure Azure Files for persistence
- Set up backup strategy
- Configure monitoring/logging
- Test failover scenarios
- Document access procedures
- Set resource limits
- Enable HTTPS (use Azure Application Gateway)
# Check container status
az container show --resource-group yourgroup --name dev8-workspace
# View logs
az container logs --resource-group yourgroup --name dev8-workspace
# Restart container
az container restart --resource-group yourgroup --name dev8-workspace- VOLUME_GUIDE.md - Complete guide to volume management, package installation, and storage optimization
- CONTAINER_CAPABILITIES.md - Whtalled and container features
- ARCHITECTURE.md - Technical architecture and design decisions
- ACR_SETUP_GUIDE.md - Azure Container Registry setup
- CHANGELOG.md - Version history and changes
docker-compose.yml: Local development configurationdocker-compose.prod.yml: Production (ACI) configuration.env.example: Development environment template.env.prod.example: Production environment templatedeploy-to-aci.sh: Automated ACI deployment scriptMakefile: Common commands and shortcuts
See LICENSE for details.