| name | docker-patterns |
| type | reference |
| description | Docker and Docker Compose patterns for local development, container security, networking, volume strategies, and multi-service orchestration. |
| origin | ECC |
| paths | ["**/Dockerfile*","**/docker-compose*","**/.dockerignore"] |
| effort | 2 |
| allowed-tools | Read, Glob, Grep |
| user-invocable | true |
| when_to_use | When setting up Docker or Docker Compose for containerized development, multi-service orchestration, or container security |
Docker Patterns
Docker and Docker Compose best practices for containerized development.
When to Activate
- Setting up Docker Compose for local development
- Designing multi-container architectures
- Troubleshooting container networking or volume issues
- Reviewing Dockerfiles for security and size
- Migrating from local dev to containerized workflow
Docker Compose for Local Development
Standard Web App Stack
services:
app:
build:
context: .
target: dev
ports:
- "3000:3000"
volumes:
- .:/app
- /app/node_modules
environment:
- DATABASE_URL=postgres://postgres:postgres@db:5432/app_dev
- REDIS_URL=redis://redis:6379/0
- NODE_ENV=development
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
command: npm run dev
db:
image: postgres:16-alpine
ports:
[, ]