By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
Docker image naming conventions help identify and manage unique images in a registry. Use the format registry/username/repo:tag for image names.
registry/username/repo:tag
docker --version
docker repository create myuser/myrepo
docker tag myimage:latest myuser/myrepo:latest
docker push myuser/myrepo:latest
docker pull myuser/myrepo:latest
docker container prune
docker image prune
docker images
Purpose: Create a new Docker repository for storing images.Command: docker repository create myuser/myrepo Flags: --name specifies the repository name.
--name
Purpose: Tag an existing image with a new name.Command: docker tag myimage:latest myuser/myrepo:latest Flags: --tag specifies the new image name.
--tag
Purpose: Push an existing image to the Docker registry.Command: docker push myuser/myrepo:latest Flags: --all-tags pushes all tags of the image.
--all-tags
Error message: Error: No such image: myimage:latest Why it happens: The image does not exist in the local Docker environment.Fix: docker pull myimage:latest
Error: No such image: myimage:latest
docker pull myimage:latest
Error message: Error: repository not found: myuser/myrepo Why it happens: The repository does not exist in the Docker registry.Fix: docker repository create myuser/myrepo
Error: repository not found: myuser/myrepo
Error message: Error: tag not found: myuser/myrepo:latest Why it happens: The tag does not exist in the repository.Fix: docker tag myimage:latest myuser/myrepo:latest
Error: tag not found: myuser/myrepo:latest
Situation: You want to check if a repository exists in the Docker registry.Command: docker repository inspect myuser/myrepo Correct response: The repository details are displayed.
docker repository inspect myuser/myrepo
Situation: You want to check if an image exists in the local Docker environment.Command: docker images myimage:latest Correct response: The image details are displayed.
docker images myimage:latest
Situation: You want to check if a tag exists in the repository.Command: docker tag myuser/myrepo:latest Correct response: The tag details are displayed.
docker tag myuser/myrepo:latest
• Docker registry URL: https://registry.hub.docker.com • Default Docker repository name: library • Default Docker username: your-username • Docker image name format: registry/username/repo:tag • ⚠️ Docker images are deleted with docker image prune • Docker images are listed with docker images • Docker repositories are created with docker repository create • Docker tags are created with docker tag • Docker images are pushed with docker push • Docker images are pulled with docker pull
https://registry.hub.docker.com
library
your-username
docker repository create
docker tag
docker push
docker pull
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.