Introduction
Building Docker images can take a long time if every step runs from scratch. Docker layer caching saves time by reusing parts of the image that did not change. This is very helpful in Continuous Integration (CI) pipelines where images are built often.
When your CI pipeline builds Docker images on every code push and you want to speed up the build.
When your Dockerfile has many steps and only a few change between builds.
When you want to reduce resource use and cost by avoiding full rebuilds in CI.
When you want faster feedback from your CI system after code changes.
When you use a remote CI system that supports caching Docker layers.