multi-stage-dockerfile
Create Lean Multi-Stage Dockerfiles
Container images can retain unnecessary build tools and rebuild dependencies too often. This skill guides Dockerfile design with separate build stages, efficient caching, and minimal runtime dependencies.
Installer avec mon Agent
Copiez cette demande dans votre Agent. Elle contient la page Skill de référence et le manifeste.
Review the Skillstore skill "multi-stage-dockerfile" from https://skillstore.io/skills/github-multi-stage-dockerfile.md and its manifest at https://skillstore.io/api/skills/github-multi-stage-dockerfile/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Votre Agent doit toujours présenter son plan et demander toute confirmation exigée par la politique de sécurité.
Ressources lisibles par les agents
Utilisez ces liens lorsqu’un Agent IA, un crawler ou un script a besoin d’un contexte propre au lieu de lire toute la page.
Tester
Utilisation de « multi-stage-dockerfile ». Review a Node.js image that includes build tools and development dependencies at runtime.
Résultat attendu:
- Use a builder stage to install dependencies and compile the application.
- Keep only production dependencies and required application artifacts in the runtime stage.
- Select a non-root runtime user and verify access to required files.
- Test application startup before comparing final image sizes.
Utilisation de « multi-stage-dockerfile ». Dependency installation repeats whenever application source files change.
Résultat attendu:
- Copy dependency manifests before application source files.
- Install dependencies in an earlier layer to preserve its cache when only source files change.
- Exclude unnecessary files from the build context.
- Compare successive builds to verify cache reuse.
Audit de sécurité
SûrAll seven static findings are false positives involving Markdown code spans or defensive Docker guidance. No evidence found of prompt injection, data exfiltration, or malicious execution in SKILL.md. The skill provides instructions, not executable tooling or verified security guarantees.
Facteurs de risque
⚙️ Commandes externes (5)
Partager et citer ce rapport
Partagez le rapport d’évaluation versionné, le badge neutre, la carte intégrable et les citations. Skillstore présente les preuves sans décider si ce Skill est sûr.
Copier le lien du rapport
https://skillstore.io/skills/github-multi-stage-dockerfile/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportBadge Markdown
[](https://skillstore.io/skills/github-multi-stage-dockerfile?utm_source=security_passport_badge)Badge HTML
<a href="https://skillstore.io/skills/github-multi-stage-dockerfile?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/github-multi-stage-dockerfile/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Carte intégrable
<iframe src="https://skillstore.io/embed/skills/github-multi-stage-dockerfile.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Citations académiques (APA · BibTeX · CFF)
Citation APA
github. (2026). multi-stage-dockerfile security audit report (audit version 1) [Author version unspecified]. Skillstore. https://skillstore.io/skills/github-multi-stage-dockerfile/audits/1Citation BibTeX
@techreport{github-github-multi-stage-dockerfile-2026,
author = {github},
title = {multi-stage-dockerfile security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/github-multi-stage-dockerfile/audits/1},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "multi-stage-dockerfile security audit report (audit version 1)"
version: "unspecified"
type: report
authors:
- name: "github"
date-released: "2026-09-29"
url: "https://skillstore.io/skills/github-multi-stage-dockerfile/audits/1"
identifiers:
- type: other
value: "skillstore:github-multi-stage-dockerfile:audit:1"
description: "Skillstore immutable audit report identifier"
Score Skillstore
Pourquoi ce score Niveau de confiance des preuves: MoyenCe que vous pouvez créer
Containerize an Application
Create separate build and runtime stages while preserving the dependencies and startup behavior an application needs.
Improve CI Build Efficiency
Review dependency installation order and build context contents to reduce avoidable cache invalidation.
Review Runtime Image Hardening
Assess runtime users, file permissions, base image choices, and unnecessary packages before deployment.
Essayez ces prompts
Create a multi-stage Dockerfile for my [language and framework] application. Ask for missing build commands, startup commands, and runtime requirements.
Review my Dockerfile and separate build dependencies from runtime requirements. Explain which artifacts must be copied and which tools can be excluded.
Review my Dockerfile and project structure for caching improvements. Suggest layer ordering and build context exclusions, then explain how to test the changes.
Review my multi-stage Dockerfile for production deployment. Evaluate base image compatibility, non-root permissions, artifact selection, runtime environment settings, and health checks. Identify assumptions requiring verification.
Bonnes pratiques
- Provide build commands, startup requirements, and native dependency constraints before requesting a Dockerfile.
- Build and test the final image, including health checks and non-root file access.
- Use image digests for immutable references and secret mounts for sensitive build credentials.
Éviter
- Copying the entire builder filesystem into the runtime image.
- Choosing Alpine or distroless images without checking dependency and health check compatibility.
- Assuming separate build stages automatically remove secrets from intermediate layers and build caches.