dockerfile-cache-xp
Installation
SKILL.md
dockerfile-cache-xp
Push BuildKit layer-cache reuse to the limit: turn a CI Dockerfile into a
Dockerfile.local that survives source-only edits in minutes instead of
rebuilding from scratch — and hand over the nerdctl command that runs it.
The CI Dockerfile is built for reproducibility from a clean state, not for
iteration. A local build pays that full cost every time. The local version keeps
the CI stage structure and rewrites each RUN to ride cache mounts across
builds.
Output
Two artifacts, placed next to the original:
<name>.local— the optimized Dockerfile (same directory as the source,.localsuffix). Preserves the original's stage structure; only changes how each stage caches.- The nerdctl build command — printed to the user, ready to run.