Docker/OCI Image Reference
technology.development.docker_refOCI container image reference in the form [registry/]repository[:tag][@digest]. Used in Dockerfiles, Kubernetes manifests, and CI/CD pipelines.
Worked samples
DuckDB 1.5.5 · finetype 0.6.64
| Value | As VARCHAR | digest | registry | repository | tag |
|---|---|---|---|---|---|
| nginx:latest | nginx:latest | nginx | latest | ||
| ghcr.io/myorg/myapp:v1.2.3 | ghcr.io/myorg/myapp:v1.2.3 | ghcr.io | myorg/myapp | v1.2.3 | |
| docker.io/library/postgres:16-alpine | docker.io/library/postgres:16-alpine | docker.io | library/postgres | 16-alpine | |
| gcr.io/project/service@sha256:abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890 | gcr.io/project/service@sha256:abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890 | sha256:abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890 | gcr.io | project/service |
Shape
^(?:(?:[a-zA-Z0-9.\-]+(?::\d+)?)/)?(?:[a-z0-9._\-/]+)(?::[a-zA-Z0-9_.\-]+)?(?:@sha256:[a-fA-F0-9]{64})?$| Value | Length | Shape |
|---|---|---|
| nginx:latest | 12 | matches |
| ghcr.io/myorg/myapp:v1.2.3 | 26 | matches |
| docker.io/library/postgres:16-alpine | 36 | matches |
| gcr.io/project/service@sha256:abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890 | 94 | matches |
Told apart
Going the other way, this type's own rule accepts 3 of 3 samples of Calendar Version and 4 of 5 samples of Version Number.
Background
Origin
The Open Container Initiative was launched on 22 June 2015 by Docker, CoreOS and other leaders in the container industry.[1] The Open Container Initiative maintains three specifications: the Runtime Specification, the Image Specification and the Distribution Specification.[1] The OCI Distribution Specification defines an API protocol to facilitate and standardise the distribution of content.[2] The OCI Distribution Specification project launched in April 2018 to standardise image distribution around the Docker Registry HTTP API V2 protocol.[3]
The Go package github.com/distribution/reference gives the grammar of a reference as a name, an optional colon and tag, and an optional at sign and digest.[4] In the distribution/reference grammar, a name is an optional domain followed by a slash and then a remote name, and a domain is a host with an optional port number.[4] The distribution/reference package sets RepositoryNameTotalLengthMax, the maximum total number of characters in a repository name, to 255.[4] The OCI Distribution Specification describes a digest as a unique identifier created from a cryptographic hash of a blob's content.[2]
Use
Docker's documentation gives the image name format as [HOST[:PORT]/]NAMESPACE/REPOSITORY[:TAG].[5] Kubernetes documentation gives busybox as equivalent to docker.io/library/busybox:latest.[6]
Kubernetes documentation says tags can be moved to point to different images, but digests are fixed.[6] Kubernetes documentation advises avoiding the :latest tag when deploying containers in production.[6] Kubernetes documentation says that when an image name carries both a tag and a digest, only the digest is used for pulling.[6]
Where you'll meet it
GitHub's Container registry is served at ghcr.io, and GitHub's documentation pushes images with references of the form ghcr.io/NAMESPACE/IMAGE_NAME:latest.[7] GitHub's Container registry documentation pulls images by digest with references of the form ghcr.io/NAMESPACE/IMAGE_NAME@sha256: followed by the hash.[7]
Sources
- [1]About the Open Container Initiativeorganisation
- [2]distribution-spec/spec.md at main · opencontainers/distribution-spec · GitHubstandard
- [3]OCI Distribution Specification v1.0 - Open Container Initiativeorganisation
- [4]reference package - github.com/distribution/reference - Go Packagesdocumentation
- [5]docker image tagdocumentation
- [6]Imagesdocumentation
- [7]Working with the Container registryorganisation
Detection notes
OCI image reference format. Includes optional registry, repository path, tag, and digest components.
Use it
$ finetype infer -i "nginx:latest" --mode column
→ technology.development.docker_ref
SELECT ft_infer('nginx:latest');
-- → 'technology.development.docker_ref'CAST({col} AS VARCHAR)Schema
https://meridian.online/schemas/technology.development.docker_ref · Frictionless type string
finetype taxonomy technology.development.docker_ref -o json-schema