liveBook · Manning

Image tag

As explained in Kubernetes in Action, Second Edition

An image tag is a human-readable label appended to a container image name to identify a particular image reference or version.

An image tag is a label after an image name that selects a particular container image version or variant. For example, redis:alpine selects the Alpine-based Redis image. section 2.1.3

Use tags to distinguish images sharing the same repository name:

  • latest is the special default tag. Omitting a tag, as in redis, makes Docker interpret the reference as redis:latest. section 2.1.3
  • Version tags identify a release, such as 7.4.1. Variant tags can combine a release with its base image, such as 7.4.1-alpine or 7.4.1-bookworm. section 2.1.3
  • A tag can select different underlying environments: Alpine is stripped down, while Bookworm is based on Debian. section 2.1.3

Selecting Redis images

Run redis:alpine for the Alpine variant, or use redis:7.4.1-alpine to request a specific Redis version and variant. Docker pulls the image when it is not already cached locally; later runs use the cached image. section 2.1.3

How Kubernetes in Action, Second Edition covers it

How deep it goes
Defines defaulting, version and variant naming, registry references, and local caching, but stops short of tag creation.
Examples
Uses Redis references redis:alpine and redis:7.4.1-alpine, plus busybox:latest in a docker run example.
What it assumes
Assumes Docker installation and basic docker run usage while explaining image names, tags, registries, and variants.
What you can do after
Apply it via Docker commands to run a chosen image version or variant.
How it connects
Connects image tags with Docker images, registries, container variants, image versions, and local image caching.

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 Kubernetes in Action, Second Edition. The section links point to the parts of the book it draws on.