Bird
0
0

Which Docker command option is used to enable squashing during image build?

easy📝 Conceptual Q2 of 15
Docker - Image Optimization
Which Docker command option is used to enable squashing during image build?
A--squash
B--compress
C--flatten
D--merge
Step-by-Step Solution
Solution:
  1. Step 1: Identify the Docker build options

    Docker build supports various flags; squashing is enabled with a specific flag.
  2. Step 2: Recognize the correct flag

    The correct flag to squash layers is --squash.
  3. Final Answer:

    --squash -> Option A
  4. Quick Check:

    Squash flag = --squash [OK]
Quick Trick: Use --squash to combine layers during build [OK]
Common Mistakes:
  • Using --compress instead of --squash
  • Confusing --flatten with squashing
  • Assuming --merge is a valid Docker flag

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes