Set up multi-container applications with Docker Compose including services, networks, and volumes
Creates Docker Compose configurations for multi-container applications with service dependencies, health checks, and environment-specific overrides. Claude uses this when you need to set up orchestrating multiple services like databases, backends, and frontends with proper networking and volume management.
/plugin marketplace add pluginagentmarketplace/custom-plugin-docker/plugin install pluginagentmarketplace-docker-container-assistant@pluginagentmarketplace/custom-plugin-dockerThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/config.yamlassets/docker-compose-template.yamlassets/schema.jsonreferences/GUIDE.mdreferences/PATTERNS.mdscripts/validate.pyMaster Docker Compose for multi-container application orchestration with service dependencies, health checks, and environment management.
Design and configure Docker Compose files for development and production environments with proper service orchestration.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| services | array | No | - | List of services to configure |
| environment | enum | No | dev | dev/staging/prod |
| include_monitoring | boolean | No | false | Add monitoring services |
Note: The version field is deprecated. Start directly with services:.
services:
frontend:
build:
context: ./frontend
target: production
ports:
- "80:80"
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
backend:
build: ./backend
expose:
- "3000"
environment:
DATABASE_URL: postgres://user:${DB_PASSWORD}@database:5432/app
depends_on:
database:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 10s
timeout: 5s
retries: 5
database:
image: postgres:16-alpine
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
volumes:
db_data:
# docker-compose.yaml (base)
services:
app:
image: myapp:latest
# docker-compose.override.yaml (dev - auto-loaded)
services:
app:
build: .
volumes:
- ./src:/app/src
environment:
- DEBUG=true
# docker-compose.prod.yaml (production)
services:
app:
deploy:
replicas: 3
restart: always
# Development (loads override automatically)
docker compose up
# Production
docker compose -f docker-compose.yaml -f docker-compose.prod.yaml up -d
# .env file (auto-loaded)
DB_PASSWORD=secret123
APP_VERSION=1.2.3
# Using in compose
environment:
- DB_PASSWORD=${DB_PASSWORD}
- VERSION=${APP_VERSION:-latest} # Default value
services:
app:
image: myapp
# Only with --profile debug
debugger:
image: debug-tools
profiles:
- debug
# Only with --profile testing
test-db:
image: postgres:alpine
profiles:
- testing
docker compose up # app only
docker compose --profile debug up # app + debugger
# Start services
docker compose up -d
# Rebuild and start
docker compose up -d --build
# View logs
docker compose logs -f backend
# Scale service
docker compose up -d --scale backend=3
# Stop and clean
docker compose down -v
# Validate config
docker compose config
| Error | Cause | Solution |
|---|---|---|
undefined service | Dependency missing | Define service |
yaml syntax error | Indentation | Fix YAML |
port already in use | Port conflict | Change port |
healthcheck failing | Service not ready | Increase start_period |
docker compose config--no-deps to skip dependenciesdocker compose configdocker compose pull# Check health status
docker inspect --format='{{json .State.Health}}' <container>
# View health logs
docker inspect --format='{{range .State.Health.Log}}{{.Output}}{{end}}' <container>
Skill("docker-compose-setup")
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.