multi-stage-dockerfile
Installation
SKILL.md
Multi-Stage Dockerfile
Use this for production-oriented Dockerfiles where build dependencies, runtime dependencies, security, and cache behavior should be explicit.
Project Fit Check
Before writing a Dockerfile:
- Detect runtime, package manager, lockfile, build output, server command, and required native dependencies.
- Read existing Dockerfiles, compose files, CI image build jobs, and deployment docs.
- Preserve the project's base-image policy, registry, and runtime user model.
- Do not introduce Alpine, distroless, rootless, or monorepo pruning patterns without checking framework/native dependency compatibility.
- If the image is deployed by CI, align build args, secrets, labels, and tags with that pipeline.