Cloud and Container Basics
An image is pulled by specifying registry.example.com/team/web:1.4. Which of the following correctly gives the meaning of each part of this reference?
- Aregistry.example.com: repository; team/web: tag; 1.4: digest computed from the image contents
- Bregistry.example.com: registry (the server that stores images); team/web: repository; 1.4: tag
- Cregistry.example.com: registry; team: repository; web: tag; 1.4: name of the container to start
Show answer and explanation
Answer: B. registry.example.com: registry (the server that stores images); team/web: repository; 1.4: tag
An image reference has the form "registry/repository:tag": the registry is the server that stores and distributes images, the repository groups images of the same kind, and the tag is a name for a version or the like; in this example, registry.example.com is the registry, team/web the repository and 1.4 the tag. If the registry is omitted, the default registry (Docker Hub) is used, and if the tag is omitted, latest is used. A tag is a name given by users, and the same tag can later be moved to a different image. The identifier that always changes when the contents change is the digest beginning with sha256, which is specified after @.
- A. 1.4 is a tag given by users. A digest is specified in the form "@sha256:…".
- B. Correct. The registry, repository and tag appear in that order.
- C. The whole of team/web is the repository name, and 1.4 is the tag. A container name is given at docker run.