Files
developer-roadmap/roadmaps/docker/content/efficient-layer-caching@frshJqVMP8D7o_7tMZMPI.md
Arik Chakma 274082fd77 feat: clean roadmap content and sync scripts (#10181)
* refactor: clean to roadmap content

* refactor: move shared helpers into scripts/lib
2026-07-28 05:45:17 +06:00

8 lines
721 B
Markdown

# Efficient Layer Caching
When building container images, Docker caches the newly created layers. These layers can then be used later on when building other images, reducing the build time and minimizing bandwidth usage. However, to make the most of this caching mechanism, you should be aware of how to efficiently use layer caching. Docker creates a new layer for each instruction (e.g., `RUN`, `COPY`, `ADD`, etc.) in the Dockerfile. If the instruction hasn't changed since the last build, Docker will reuse the existing layer.
Visit the following resources to learn more:
- [@official@Docker Layer Caching](https://docs.docker.com/build/cache/)
- [@video@Layer Caching](https://www.youtube.com/watch?v=_nMpndIyaBU)