Loading...
Loading...
Dockerfile optimization guidelines from official Docker documentation. This skill should be used when writing, reviewing, or refactoring Dockerfiles to ensure optimal build time, image size, security, and robustness. Triggers on tasks involving Dockerfile creation, Docker image builds, container optimization, multi-stage builds, build cache, or Docker security hardening.
npx skill4agent add pproenca/dot-skills dockerfile-optimise| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Layer Caching & Ordering | CRITICAL | |
| 2 | Multi-Stage Builds | CRITICAL | |
| 3 | Base Image Selection | HIGH | |
| 4 | Build Context Management | HIGH | |
| 5 | Security & Secrets | HIGH | |
| 6 | Dependency Management | MEDIUM-HIGH | |
| 7 | Instruction Patterns | MEDIUM | |
| 8 | Quality & Validation | MEDIUM | |
cache-layer-ordercache-copy-deps-firstcache-copy-linkcache-mount-packagecache-apt-combinecache-externalcache-invalidationcache-minimize-layersstage-separate-build-runtimestage-named-stagesstage-parallel-branchesstage-target-buildsstage-copy-artifacts-onlystage-reusable-basebase-minimal-imagebase-official-imagesbase-pin-versionsbase-arg-versionbase-rebuild-regularlybase-distrolessctx-dockerignorectx-bind-mountsctx-minimize-contextctx-syntax-directivesec-secret-mountssec-non-root-usersec-no-secrets-in-argssec-ssh-mountssec-attestationssec-no-unnecessary-packagessec-ephemeral-containersdep-cache-mount-aptdep-cache-mount-npmdep-cache-mount-pipdep-version-pindep-cleanup-cachesinst-json-cmdinst-healthcheckinst-heredoc-scriptsinst-entrypoint-execinst-workdir-absoluteinst-copy-over-addlint-build-checkslint-pipefaillint-labelslint-sort-argumentslint-single-concern| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |