Skip to main content

What does an image tag do?

A tag on an image is a pointer to a specific version of the image within a repository. It helps distinguish one build from another and choose exactly which version to run or download.

Why a tag is needed

  • distinguish versions (1.0, 2.0, alpine, dev)
  • manage updates
  • unambiguously reference a specific image

Example

javascript
docker pull nginx:1.25

downloads a specific version, while:

javascript
docker pull nginx:latest

takes the default version, marked as latest.

An important detail

A tag is not a copy, just a label that points to a certain image. The same image can have several tags.

Summary: a tag is a version label of a Docker image that lets you unambiguously identify the build you need.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.

What does an image tag do?: Docker Interview Question