Bird
0
0

You enabled BuildKit but your Docker build still runs slowly and does not cache properly. What is a likely cause?

medium📝 Troubleshoot Q6 of 15
Docker - Image Optimization
You enabled BuildKit but your Docker build still runs slowly and does not cache properly. What is a likely cause?
ABuildKit requires Docker daemon restart after enabling
BBuildKit is incompatible with multi-stage builds
CYou must disable BuildKit to enable caching
DThe Dockerfile does not use BuildKit-specific cache mounts
Step-by-Step Solution
Solution:
  1. Step 1: Identify caching requirements

    BuildKit caching requires Dockerfile to use cache mounts explicitly.
  2. Step 2: Check other options

    BuildKit supports multi-stage builds, does not require disabling, and no daemon restart is needed.
  3. Final Answer:

    The Dockerfile does not use BuildKit-specific cache mounts -> Option D
  4. Quick Check:

    Proper caching needs cache mounts in Dockerfile [OK]
Quick Trick: Use cache mounts in Dockerfile for BuildKit caching [OK]
Common Mistakes:
  • Assuming BuildKit disables multi-stage builds
  • Thinking caching works without cache mounts
  • Restarting daemon unnecessarily

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes