A CI pipeline that used to take 3 minutes now takes 18 minutes after a team grew its monorepo
The build stage rebuilds the full Docker image from scratch on every run with no apparent caching. Diagnose the likely causes and propose fixes. Expected reasoning: check whether the CI runner is ephemeral (fresh VM/container per job) with no persisted build cache, in which case every run genuinely starts cold; introduce platform-native caching (GitHub Actions cache, or a registry-based --cache-from/--cache-to with BuildKit) so layers persist across runs. Also check Dockerfile instruction ordering for unnecessary cache invalidation (Chapter 2/3) and confirm .dockerignore is excluding unrelated
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full DevOps Mastery library.
A CI pipeline that used to take 3 minutes now takes 18 minutes after a team grew its monorepo