Skip to content
StackDecode
AdvancedLesson 22 of 26

Registries, tags and digests

Tags are movable labels; digests are immutable fingerprints.

A tag like 1.0 can be re-pointed to a different image. A digest (@sha256:...) identifies exact content.

bash
docker pull python:3.12-slim
docker inspect --format '{{index .RepoDigests 0}}' python:3.12-slim
# python@sha256:...   <- pin this in production Dockerfiles

Private registries include GitHub Container Registry, AWS ECR, Google Artifact Registry and self-hosted Harbor. Sign images (for example with Sigstore cosign) so deployers can verify where they came from.