MeridianMERIDIAN

Docker/OCI Image Reference

technology.development.docker_ref

OCI 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

ValueAs VARCHARdigestregistryrepositorytag
nginx:latestnginx:latestnginxlatest
ghcr.io/myorg/myapp:v1.2.3ghcr.io/myorg/myapp:v1.2.3ghcr.iomyorg/myappv1.2.3
docker.io/library/postgres:16-alpinedocker.io/library/postgres:16-alpinedocker.iolibrary/postgres16-alpine
gcr.io/project/service@sha256:abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890gcr.io/project/service@sha256:abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890sha256:abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890gcr.ioproject/service

Shape

Pattern
^(?:(?:[a-zA-Z0-9.\-]+(?::\d+)?)/)?(?:[a-z0-9._\-/]+)(?::[a-zA-Z0-9_.\-]+)?(?:@sha256:[a-fA-F0-9]{64})?$
ValueLengthShape
nginx:latest12matches
ghcr.io/myorg/myapp:v1.2.326matches
docker.io/library/postgres:16-alpine36matches
gcr.io/project/service@sha256:abcdef1234567890abcdef1234567890abcdef1234567890abcdef123456789094matches

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]

Detection notes

OCI image reference format. Includes optional registry, repository path, tag, and digest components.

Use it

CLI · DuckDB
$ finetype infer -i "nginx:latest" --mode column
→ technology.development.docker_ref

SELECT ft_infer('nginx:latest');
-- → 'technology.development.docker_ref'
Cast expression
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

Aliases

oci_image_refcontainer_image

Type Registry