Docker
Image Reference Parser
Break an image reference into registry, repository, tag and digest, and see which defaults were implied.
Image reference
[registry[:port]/][namespace/]name[:tag][@digest]
Components
- Registry
ghcr.io- Repository
owner/repo- Namespace
owner- Name
repo- Tag
1.2.3- Digest
—
Fully qualified
ghcr.io/owner/repo:1.2.3Every default made explicit. A single-component name on Docker Hub resolves under the library namespace.
Tag
semver
- Raw
- 1.2.3
- Prefix
- —
- Major
- 1
- Minor
- 2
- Patch
- 3
- Suffix
- —
Review
Examples
The parsing rules here match github.com/distribution/reference, the library Docker itself uses — including the awkward case where an uppercase first component is read as a registry host rather than a namespace.