docker-expert
Installation
SKILL.md
Docker Expert
Overview
The Docker Expert skill produces optimized, production-ready Dockerfiles and Docker Compose configurations for any application stack. It applies container best practices: minimal base images (Alpine, Distroless, slim variants), multi-stage builds to minimize final image size, non-root user execution for security, strategic layer ordering to maximize cache reuse, .dockerignore files to exclude unnecessary build context, and health check definitions for orchestrator integration. The skill handles single-service containerization and multi-service local development environments with Docker Compose, including networking, volumes, secrets, and environment variable management.
When to Use
- Writing a new Dockerfile for any application (Node.js, Python, Java, Go, Ruby, etc.)
- Reducing Docker image size with multi-stage builds and minimal base images
- Applying container security hardening (non-root user, read-only filesystem, dropped capabilities)
- Configuring a
docker-compose.ymlfor local development with databases, caches, and app services - Writing
.dockerignorefiles to reduce build context size and prevent secret leakage - Adding
HEALTHCHECKinstructions for container health monitoring - Troubleshooting slow builds, large images, or container startup failures
- Converting a non-containerized app to run in Docker for the first time