0
0
Dockerdevops~20 mins

Image naming conventions (registry/image:tag) in Docker - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Docker Image Naming Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding Docker image naming format
Which part of the Docker image name registry.example.com/myapp/backend:1.2.3 specifies the version of the image?
A1.2.3
Bmyapp/backend
Cmyapp
Dregistry.example.com
Attempts:
2 left
💡 Hint
The version is usually indicated after a colon at the end.
💻 Command Output
intermediate
2:00remaining
Output of docker pull with full image name
What will be the output status when running docker pull registry.example.com/myapp/frontend:latest if the image exists in the registry?
AError: image not found
B
latest: Pulling from myapp/frontend
Digest: sha256:abc123...
Status: Downloaded newer image for registry.example.com/myapp/frontend:latest
CStatus: Image is up to date for registry.example.com/myapp/frontend:latest
DPermission denied
Attempts:
2 left
💡 Hint
Pulling an image shows download progress and digest.
Configuration
advanced
2:00remaining
Correct image name for private registry
Which of the following is the correct Docker image name to push an image to a private registry at myregistry.local:5000 with repository project/api and tag v5?
Aproject/api:v5
Bmyregistry.local/project/api:v5
Cmyregistry.local:5000/project/api:v5
Dmyregistry.local:project/api:v5
Attempts:
2 left
💡 Hint
Private registries often include port numbers after a colon.
Troubleshoot
advanced
1:30remaining
Error caused by invalid image tag format
What error will Docker show if you try to tag an image with an invalid tag containing uppercase letters, like myapp/backend:VersionOne?
AError response from daemon: invalid reference format
BTag created successfully
CError: tag contains invalid characters
DWarning: tag converted to lowercase
Attempts:
2 left
💡 Hint
Docker tags must be lowercase and follow specific rules.
Best Practice
expert
2:30remaining
Choosing the best tag for continuous deployment
In a continuous deployment pipeline, which tag naming strategy is best to ensure traceability and avoid overwriting images unintentionally?
AUse the 'latest' tag for every build
BUse random strings as tags for each build
CUse timestamps as tags like '20240615-1530'
DUse semantic versioning tags like 'v1.2.3' for each build
Attempts:
2 left
💡 Hint
Tags should help identify the exact version deployed.