advancedTop 100 Interview Questions
What does a BuildKit cache mount do differently from normal layer caching?
It persists a specific directory's contents (like a package manager's download cache) across builds without ever making that directory part of an image layer, so dependency downloads can be skipped on rebuild even when the layer that would have contained them must otherwise rebuild due to an earlier change in the same RUN step.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response