Docker - Image OptimizationWhich Docker command option is used to enable squashing during image build?A--squashB--compressC--flattenD--mergeCheck Answer
Step-by-Step SolutionSolution:Step 1: Identify the Docker build optionsDocker build supports various flags; squashing is enabled with a specific flag.Step 2: Recognize the correct flagThe correct flag to squash layers is --squash.Final Answer:--squash -> Option AQuick Check:Squash flag = --squash [OK]Quick Trick: Use --squash to combine layers during build [OK]Common Mistakes:Using --compress instead of --squashConfusing --flatten with squashingAssuming --merge is a valid Docker flag
Master "Image Optimization" in Docker9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Docker Quizzes Docker Security - Running containers as non-root - Quiz 6medium Docker Security - Read-only filesystem containers - Quiz 11easy Docker Security - Why container security matters - Quiz 13medium Docker in CI/CD - Why Docker in CI/CD matters - Quiz 12easy Image Optimization - Analyzing image layers with dive - Quiz 3easy Logging and Monitoring - Prometheus for Docker monitoring - Quiz 8hard Logging and Monitoring - Grafana dashboards for containers - Quiz 8hard Logging and Monitoring - Alert setup for container health - Quiz 11easy Production Patterns - Why production patterns matter - Quiz 11easy Resource Management - Storage driver options - Quiz 4medium