Skip to content
BENIBIX Learn

Image Tag

Infrastructure📦 ContainersImages and Registries

Also known as Docker Tag, Container Image Tag, latest Tag

The label after the colon in an image name. It often names a version.

Think of it like

Think of it like a label on a jar. The label says which batch is inside.

Example

Emma's server runs postgres:17. Version 18 is out, but her server stays on 17 until she changes the tag herself.

Why it matters

The tag decides what runs. Pinning a version stops a surprise update on the next pull.

Definition

An image tag is the label after the colon in an image name, such as 1.27 in nginx:1.27. It usually names a version. If you leave the tag off, Docker uses latest. A tag can be moved to a newer image later, so the same name may not always give the same image. To pin one exact image, you use its digest, a long code made from its contents.

Example code

bash
docker pull nginx:1.27
The part after the colon is the tag. Without it, Docker would pull nginx:latest instead.
The label myapp:1.2 points at one whole stack. The part after the colon is the tag.

Common mistake

Using latest on a server. It means whatever was pushed last, so a restart can pull a different version.

Key takeaways

  1. 1
    After the colon. name:tag, such as nginx:1.27.
  2. 2
    Default is latest. Used when no tag is given.
  3. 3
    Tags can move. A digest pins one exact image.