liveBook · Manning

Image tag

As explained in Learn Docker in a Month of Lunches, Second Edition

An image tag is a human-readable name or label that identifies a container image reference.

An image tag is a human-readable label that distinguishes versions or variants of a container image. It forms part of the image reference, such as `nginx:1.27` or `registry.local:5010/gallery/ui:2.1`. If omitted, Docker uses the `latest` tag; if the registry is omitted, Docker uses Docker Hub. section 5.1

Use tags to make image selection explicit:

  • Tag application releases with major, minor, and patch levels, such as `2`, `2.1`, and `2.1.106`. section 5.4
  • Choose a patch tag for repeatable deployments, a minor tag for patch updates, or a major tag for broader updates. section 5.4
  • Avoid relying on unqualified or moving tags for Dockerfile base images because new build or runtime releases can break builds or applications. section 5.4
  • Include platform information when separate images target different systems, such as `2e-linux-arm64` and `2e-linux-amd64`. section 12.1

Build and retag an image

Build an image with a tag, then add release-oriented aliases: `docker image build --tag web-ping .`; `docker image tag image-gallery registry.local:5010/gallery/ui:2.1.106`; `docker image tag image-gallery registry.local:5010/gallery/ui:2.1`. The first command stores the tagged image locally; the second and third names can represent a fixed patch release and a moving minor-release alias. section 3.3 section 5.4

Figure 5.1 Anatomy of a Docker image reference
figure

Use the image-reference anatomy to locate the registry, repository, image name, and tag in a complete reference. section 5.1

How Learn Docker in a Month of Lunches, Second Edition covers it

How deep it goes
Explains naming defaults, version aliases, platform variants, and reproducibility trade-offs, but does not detail registry manifest internals.
Examples
Uses nginx release and Alpine tags, web-ping builds, registry aliases, and separate Arm and Intel image tags.
What it assumes
Assumes basic Docker image and container use while teaching image-reference structure, registry defaults, and version-tag choices.
What you can do after
Apply it via Docker commands to build, retag, select, and stabilize container images across releases and platforms.
How it connects
Connects image references with container registries, Dockerfiles, image builds, platform architectures, and release versioning.

Also explained in

Compare how 6 books explain image tag →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Docker in a Month of Lunches, Second Edition. The section links point to the parts of the book it draws on.