Docker - in CI/CDWhich Dockerfile instruction creates a new layer that can be cached during CI builds?ACMDBRUNCLABELDENVCheck Answer
Step-by-Step SolutionSolution:Step 1: Review Dockerfile instructions and layersEach Dockerfile instruction creates a layer, but RUN executes commands creating filesystem changes.Step 2: Identify which instruction affects cachingRUN creates layers with changes that can be cached; ENV and LABEL set metadata, CMD sets runtime command.Final Answer:RUN -> Option BQuick Check:Layer-creating instruction = RUN [OK]Quick Trick: RUN commands create cacheable layers in Dockerfile [OK]Common Mistakes:Confusing CMD with layer creationThinking ENV creates large cache layersAssuming LABEL affects caching
Master "in CI/CD" in Docker9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Docker Quizzes Docker Security - Secrets management - Quiz 2easy Docker Security - Read-only filesystem containers - Quiz 10hard Docker Security - Read-only filesystem containers - Quiz 4medium Docker in CI/CD - Running tests in containers - Quiz 1easy Docker in CI/CD - GitLab CI with Docker - Quiz 1easy Production Patterns - Sidecar container pattern - Quiz 13medium Production Patterns - Canary deployment pattern - Quiz 2easy Production Patterns - Container orchestration in production - Quiz 15hard Production Patterns - Sidecar container pattern - Quiz 2easy Resource Management - Memory limits and reservations - Quiz 15hard