Challenge - 5 Problems
Docker Image Tagging Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Understanding Docker image tag output
What is the output of the command
docker images --format "{{.Repository}}:{{.Tag}}" | grep '^myapp:' if the local images are:- myapp:latest
- myapp:1.0
- myapp:1.1
- otherapp:2.0
Docker
docker images --format "{{.Repository}}:{{.Tag}}" | grep '^myapp:'
Attempts:
2 left
💡 Hint
The grep command filters lines starting with 'myapp:'
✗ Incorrect
The command lists all images with their repository and tag, then grep filters only those starting with 'myapp:'. So only the three 'myapp' tags appear.
🧠 Conceptual
intermediate1:30remaining
Docker image tag best practice
Which of the following is the best reason to avoid using the
latest tag in production deployments?Attempts:
2 left
💡 Hint
Think about stability and predictability in production
✗ Incorrect
Using 'latest' means you might pull a different image version than expected, causing unpredictable behavior. Versioned tags ensure you deploy a known image.
🔀 Workflow
advanced2:00remaining
Tagging and pushing multiple image versions
You built a Docker image locally with ID
abc123. You want to tag it as myapp:1.0 and myapp:stable and push both tags to Docker Hub. Which sequence of commands correctly does this?Attempts:
2 left
💡 Hint
Remember to tag the image ID before pushing tags
✗ Incorrect
You must tag the image ID with each tag, then push each tag separately. Option C does this correctly.
❓ Troubleshoot
advanced1:30remaining
Troubleshooting image pull failure with tags
You run
docker pull myapp:2.0 but get the error manifest for myapp:2.0 not found. What is the most likely cause?Attempts:
2 left
💡 Hint
Check if the tag exists remotely
✗ Incorrect
This error means Docker cannot find the specified tag in the remote repo. The tag might not have been pushed or was deleted.
✅ Best Practice
expert2:00remaining
Versioning strategy for Docker images in CI/CD
In a CI/CD pipeline, which tagging strategy best supports traceability and rollback of Docker images?
Attempts:
2 left
💡 Hint
Think about linking image versions to exact code changes
✗ Incorrect
Tagging with Git commit SHA links the image to the exact source code version, enabling precise traceability and rollback.