Docker image names: registries and repositories
Quick answer
An image reference tells Docker which image to locate. It can contain a registry host, repository path, tag and a digest. A registry stores and serves images; a repository groups versions under a name.
How it works
In docker.io/library/busybox:1.37, docker.io is the registry, library/busybox is the repository and 1.37 is the tag. Docker normally expands busybox:1.37 to this Docker Hub reference. A private registry might use a host and port, such as registry.example.invalid:5000/team/demo:dev; the port belongs to the registry, not the tag. That illustrative hostname is not a real lab service. If a tag is omitted and no digest is specified, the default is latest. This does not mean the newest build. A registry port is part of the host component.
Lab prerequisites
Use only a disposable approved Linux-container Docker context. Confirm the active context with docker context show before any mutation. The instructor must preload and review busybox:1.37 for the target platform and record its digest. The tag is a fixture convention inherited from earlier chapters, not a verified immutable version. Commands are static examples, not executed by ByteMind. Before any engine request, confirm the effective approved daemon endpoint, including DOCKER_HOST, DOCKER_CONTEXT and CLI overrides; do this privately in each terminal. Confirm the local tag still resolves to the approved image identity and platform. If any check fails, use the paper exercise instead.
Command example
docker image inspect --format '{{.Id}}' busybox:1.37docker image inspect --format '{{.Id}}' docker.io/library/busybox:1.37With the approved fixture loaded under the usual name, both commands should report the same image ID. They inspect local metadata and do not contact a registry. Local here means the selected daemon’s image store, which can be on a different machine from the CLI.
Common mistakes
A container name is not an image reference. Giving a container a new name does not publish a repository or change its image.
Manual practice
On paper, split registry.example.invalid:5000/team/demo:dev into host, port, repository and tag. Then compare the two local image IDs above.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Docker image names: registries and repositories — Knowledge check
Apply the concepts from this lesson.
What is `team/demo` in `registry.example.invalid:5000/team/demo:dev`?
Which part is the tag in `registry.example.invalid:5000/team/demo:dev`?
Does naming a container publish an image?