Multi stage dockerfile
Skill kimtth/agent-skill-100-lines-or-less/skills/multi-stage-dockerfile
Use when: create or review optimized multi-stage Dockerfiles for smaller, safer, reproducible application images.From its SKILL.md
npx -y skills add kimtth/agent-skill-100-lines-or-less --skill multi-stage-dockerfileAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.2 KB, 228 tokens by cl100k_base, as published. Nobody here has run it
Goal: produce a Dockerfile with separate build and runtime concerns.
Use for:
- new Dockerfiles
- reducing image size
- removing build tools or secrets from runtime images
- improving layer cache and reproducibility
Workflow:
- Detect language, package manager, build command, test command, and runtime port.
- Use a builder stage for dependencies, compilation, and tests.
- Use a runtime stage with only required artifacts and runtime deps.
- Pin base image versions and keep layers cache-friendly.
- Add
.dockerignore, non-root user, and healthcheck when appropriate. - Build and smoke test the image.
Best practices:
- name stages with
AS builder,AS runtime, etc. - copy lockfiles before source for dependency caching
- avoid secrets in
ARG,ENV, layers, or final image - use minimal official or distroless images when compatible
Rules:
- do not use
latesttags for reproducible builds - do not run as root unless required
- do not copy the whole build context blindly
- verify the runtime image starts
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.