Challenge - 5 Problems
Docker Image Listing Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
What is the output of the command to list all local Docker images?
You run the command
docker images on a system with three images: alpine:latest, ubuntu:20.04, and nginx:1.21. What will the command output show?Docker
docker imagesAttempts:
2 left
💡 Hint
The
docker images command lists all local images with their tags and sizes.✗ Incorrect
The
docker images command shows all local images. Since there are three images, all appear in the output with their details.🧠 Conceptual
intermediate2:00remaining
Which Docker command lists only image IDs of local images?
You want to see just the image IDs of all local Docker images without other details. Which command will do this?
Attempts:
2 left
💡 Hint
Use the
--format option with a Go template to customize output.✗ Incorrect
The
docker images --format "{{.ID}}" command lists only the image IDs. Option A is close but -q alone lists IDs; --all is not needed here.❓ Troubleshoot
advanced2:00remaining
Why does
docker images show no images after pulling one?You run
docker pull nginx successfully, but then docker images shows no images. What could cause this?Attempts:
2 left
💡 Hint
Check if Docker is using the same context or daemon for both commands.
✗ Incorrect
Docker contexts or daemons can be switched. Pulling an image in one context and listing images in another shows no images.
🔀 Workflow
advanced2:00remaining
What is the correct sequence to list images, remove one, then verify removal?
You want to list all images, remove the image with ID abc123, then confirm it is removed. Which sequence of commands is correct?
Attempts:
2 left
💡 Hint
You must list images first to see what is available before removing.
✗ Incorrect
First list images to confirm the image ID, then remove it, then list again to verify removal.
✅ Best Practice
expert2:00remaining
Which command safely lists all local images including intermediate layers?
You want to see all local Docker images including intermediate layers that are not tagged. Which command achieves this?
Attempts:
2 left
💡 Hint
Use the option that shows all images, not just tagged ones.
✗ Incorrect
The
--all option lists all images including intermediate layers. Other options do not exist or are invalid.