All tools / Containers

Image reference parser

Split a container image reference into registry, repository, tag, and digest, and flag floating tags.

Parts

Summary

Reference shape

PieceRule of thumb
RegistryThe first component is a registry when it contains a dot or a port, or is localhost. Otherwise Docker Hub is assumed.
TagThe colon after the last slash. latest is a movable label.
Digest@sha256: plus 64 hex characters. A digest pin does not move when the tag is retagged.