Pcornel
Browse topics
Options
Recent
Favorites
Containers · Technical reference

Image Tags and Digests

Direct answer

Tags are mutable names for images (nginx:1.27, latest); digests (sha256:…) identify exact image content and never change.

When to use this

Use it when deciding how to reference images in deployments, or when two hosts run different content under the same tag.

First 30 seconds

1. What tag is deployed? pod spec / compose file.

2. Running digest: kubectl get pod <p> -o jsonpath='{.status.containerStatuses[*].imageID}'.

3. Same tag, different digest across nodes?

4. Pin image: repo@sha256:… (or immutable tags).

5. Redeploy.

Operational verification

tag → resolved to digest at pull → content

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Docker / containerd / Podman / Kubernetes / OCI-compatible platforms
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformDocker / containerd / Podman / Kubernetes / OCI-compatible platforms
Scope / prerequisiteUse it when deciding how to reference images in deployments, or when two hosts run different content under the same tag.
What next?2 suggested next steps
Evidence0
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 How to verify Verify boundary

Record the digest in deployment manifests or release notes. After a rollout, compare the Pod imageID with the expected digest. For multi-arch images, confirm the platform-specific manifest exists for every node architecture.

Step 2 Common failures Narrow the fault

Reusing a tag with imagePullPolicy IfNotPresent leaves old nodes running old content. An image built only for amd64 fails with exec format error on arm64 nodes. Deleting a tag in the registry does not delete the manifest still referenced by digest.

Key points

latest and moving tags lead to surprises — use immutable version tags plus digests in production. Kubernetes imagePullPolicy: IfNotPresent with a reused tag can keep old images on nodes.

Key checks
  • docker ps -a — containers and exit codes
  • docker logs <c> — container output
  • docker inspect <c> — config, mounts, network, state
ReferenceWhat it is1 section · depth on demand

How it works

Registries store manifests and blobs by digest. Pushing a tag updates a pointer to a manifest digest. A multi-arch tag points to an image index; the client picks the manifest that matches its platform. Kubernetes imagePullPolicy decides whether an existing local image for a tag is reused.

ReferenceImportant terms & boundaries3 sections · depth on demand

Tags vs digests in practice

docker pull nginx:1.27
docker image inspect nginx:1.27 --format '{{index .RepoDigests 0}}'
docker pull nginx@sha256:<digest>

Tags (latest, 1.27) can move to new images; digests are immutable. Deploy by digest (or immutable tags in the registry) so every node runs the same image, and use tools like Renovate to update pinned digests deliberately.

In depth

A tag is a movable name; a digest is the SHA-256 of the manifest and never changes. nginx:1.27 can point to different content tomorrow; nginx@sha256:… always means the same bytes.

What actually happens on pull

1. The client resolves the tag to a manifest (or image index) digest.

2. For an index, it selects the manifest for its platform (linux/amd64, linux/arm64 …).

3. It downloads only layer blobs it does not already have.

Worked check — what is running, by digest?

docker image inspect nginx:1.27 --format '{{index .RepoDigests 0}}'
# nginx@sha256:4c0f…  (manifest-list digest)
kubectl get pod web-5d8f -o jsonpath='{.status.containerStatuses[0].imageID}'
# docker.io/library/nginx@sha256:4c0f…

If two Pods of the same Deployment report different imageID values, the tag moved between pulls.

Choosing a pinning strategy

StrategyReproduciblePicks up security fixes
:latestNoUnpredictably
:1.27 (minor tag)NoYes, on next pull
:1.27.3 (patch tag)Mostly; tags can be re-pushedNo
@sha256:…YesOnly when you update the digest
:1.27.3@sha256:…Yes, and readableOnly when you update both

Pin by digest in production manifests and let a bot (for example Renovate or Dependabot) raise updates, so changes are reviewed instead of arriving silently.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Common mistakes

  • Deploying mutable tags instead of digests.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
image tags and digestsimage digest sha256multi-arch image index
Confirmation

Confirm action

Continue?