What problem does it solve?
Docker and container best practices. Load when writing Dockerfiles, building
images, or containerizing applications. Triggers: Dockerfile, docker build,
multi-stage builds, layer caching, image optimization, container security,
or docker-compose configuration.
Core Features & Use Cases
- Multi-Stage Builds: Reduce final image size by separating build-time and runtime
- Layer Caching & BuildKit: Speed up builds and improve reproducibility
- Base Image Selection: Pin and choose minimal, appropriate bases
- Security Hardening: Non-root execution, read-only filesystem, avoid secrets
- Image Scanning: Integrate vulnerability scanning into the pipeline
- .dockerignore: Exclude unnecessary files from build context
- CI/CD Integration: Automate builds, tagging, and deployment
- Docker-Compose Guidance: Local development and orchestration patterns
Quick Start
Apply the Docker best-practices patterns to your Dockerfiles and CI/CD pipelines to optimize size, security, and build performance.