Challenge - 5 Problems
FROM Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Output of Docker build with FROM alpine
What will be the base image used and the first line output when building this Dockerfile?
FROM alpine RUN echo Hello World
Docker
FROM alpine
RUN echo Hello WorldAttempts:
2 left
💡 Hint
The FROM instruction sets the base image for the build.
✗ Incorrect
The FROM alpine sets the base image to alpine. The RUN command executes and prints Hello World.
🧠 Conceptual
intermediate1:30remaining
Purpose of the FROM instruction
What is the main purpose of the FROM instruction in a Dockerfile?
Attempts:
2 left
💡 Hint
Think about what sets the starting point for building an image.
✗ Incorrect
FROM sets the base image which is the starting point for the Docker image build.
❓ Configuration
advanced2:30remaining
Using multiple FROM instructions
What happens when a Dockerfile contains multiple FROM instructions?
Attempts:
2 left
💡 Hint
Multiple FROM instructions enable building in stages.
✗ Incorrect
Multiple FROM instructions create separate build stages, useful for multi-stage builds.
❓ Troubleshoot
advanced2:00remaining
Error when using invalid base image in FROM
What error will Docker show if the base image specified in FROM does not exist?
Attempts:
2 left
💡 Hint
Docker tries to pull the image and fails if it doesn't exist.
✗ Incorrect
Docker reports manifest not found error when the base image is missing.
✅ Best Practice
expert3:00remaining
Choosing a base image for minimal size
Which base image is best to use in the FROM instruction for the smallest possible image size?
Attempts:
2 left
💡 Hint
One base image is completely empty and minimal.
✗ Incorrect
scratch is an empty image with zero size, ideal for minimal images.