Bird
0
0

How do you correctly specify the scratch base image at the beginning of a Dockerfile?

easy📝 Syntax Q3 of 15
Docker - Image Optimization
How do you correctly specify the scratch base image at the beginning of a Dockerfile?
AIMAGE scratch
BBASE scratch
CFROM scratch
DSTART scratch
Step-by-Step Solution
Solution:
  1. Step 1: Identify the Dockerfile base image syntax

    The correct keyword to specify a base image is FROM.
  2. Step 2: Use the exact base image name

    The minimal base image is named scratch, so the line should be FROM scratch.
  3. Final Answer:

    FROM scratch -> Option C
  4. Quick Check:

    Check Dockerfile syntax for base image declaration [OK]
Quick Trick: Always start with 'FROM scratch' for minimal base image [OK]
Common Mistakes:
  • Using incorrect keywords like BASE or IMAGE
  • Omitting the FROM keyword
  • Misspelling 'scratch'

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes