Agent skill · software engineering · erichowens
docker-containerization
Write production-grade Dockerfiles, docker-compose configurations, multi-stage builds, and container optimization. Activate on "Dockerfile", "docker", "docker-compose", "container", "multi-stage
Why this skill is useful
Adds specific multi-stage Dockerfile patterns and optimization techniques that the AI wouldn't reliably generate on its own.
What it needs
Requires docker installed locally. About 7k tokens when loaded. Last updated 2026-07-14. 180 stars on the source repository.
What this skill does
Docker Containerization Write production-grade Dockerfiles with multi-stage builds, security hardening, and size optimization. Covers docker-compose for local development, image layer caching, health checks, and the patterns that separate a 2GB image from a 50MB one. When to Use Use for: Writing Dockerfiles from scratch or improving existing ones Multi-stage builds for compiled languages (Go, Rust, TypeScript) Docker Compose for local development environments Image size optimization (choosing base images, layer caching) Docker security scanning and hardening Development vs production Dockerfile patterns Debugging container build failures .dockerignore optimization NOT for: Kubernetes deployment/orchestration (different domain) Cloud-specific container services (ECS, Cloud Run, App Runner) CI/CD pipeline configuration (use github-actions-pipeline-builder) Container networking beyond docker-compose Docker Swarm --- Dockerfile Decision Tree --- Production Patterns by Language Node.js / TypeScript (Multi-Stage) Python (uv — Fastest) Go (Multi-Stage → Distroless) --- Layer Caching Strategy Rule: Order Dockerfile instructions from least-frequently-changed to most-frequently-changed. Each instruction creates a layer. When a layer changes, all subsequent layers are rebuilt. Anti-Pattern: COPY Before Dependencies Novice: Expert: Timeline: This has been best practice since Docker layer caching was introduced, but LLMs trained on older tutorials still generate the wrong order. --- Docker Compose for Development Anti-Pattern: No Health Checks Novice: Relies on dependson alone — but that only waits for the container to START, not for the service to be READY. Expert: Always add healthcheck to database/cache services and use condition: servicehealthy in dependson. A Postgres container that has started but hasn't finished WAL recovery will crash your app. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills erichowens/docker-containerization