#Build Cache

2 posts

Docker Intermediate #2: Build Cache — BuildKit and Layer Ordering
8 min read

Docker Intermediate #2: Build Cache — BuildKit and Layer Ordering

BuildKit-era build caching, in earnest. Spotting where layer cache breaks, sharing npm/pip caches across builds with --mount=type=cache, parallelizing builds with COPY --link, and external caches via GHA / registry.

Docker Basics #6: .dockerignore and the Build Context — Using the Cache Well
8 min read

Docker Basics #6: .dockerignore and the Build Context — Using the Cache Well

The most common reason builds get slow or images get bloated is mishandling the build context. What it is, how to trim it with .dockerignore, and how to find where the layer cache breaks so you can order your instructions well. Wrap-up for Docker Basics.