Container images (OCI)
Push and pull container images and other OCI content with Docker, Podman and Kubernetes, and set up the repositories that hold them.
On this page
Image references
An OCI repository serves images and every other OCI artifact (signatures, SBOMs, Helm charts) through the OCI distribution API.
| Part | Example | Rule |
|---|---|---|
| Host | quader.example.com |
the installation's address, no scheme |
| Project and repository | web/docker |
their keys |
| Image name | team/app |
lower-case components; with the two parts above at most 255 characters |
| Tag or digest | :1.0, @sha256:<hex> |
a tag has at most 128 characters |
So quader.example.com/web/docker/team/app:1.0 is the tag 1.0 of team/app in the repository docker of the project web. On a host bound to one repository the reference is <host>/<name>:<tag> (below).
Sign in
Sign in with a Quader token as the password; the user name is ignored:
read -rs QUADER_TOKEN && export QUADER_TOKEN
printf '%s' "${QUADER_TOKEN}" | docker login quader.example.com/web/docker --username quader --password-stdin # example
The client exchanges it at /v2/_token for a registry token (prefix qdr_rgt_) that lives oci.token_lifetime and never holds more than your token; revoking your token ends it. Docker keeps one credential per host, so one login covers every repository there; Podman reads Docker's file as a fallback. A Public repository pulls without a login. With a certificate of your own authority, put its CA into /etc/docker/certs.d/<host>/ca.crt (Podman: /etc/containers/certs.d/<host>/ca.crt).
| Operation | Permission |
|---|---|
| Pull, list tags, read referrers | read |
| Push a new tag, a layer, by digest | deploy |
| Point an existing tag at another image | deploy and overwrite |
| Delete a tag, manifest or layer | delete |
The first push of an image name makes you its owner: after that only owners, holders of manage and administrators push to it, move its tags or delete it.
Push and pull
docker tag myapp:1.0 quader.example.com/web/docker-local/myapp:1.0 # example
docker push quader.example.com/web/docker-local/myapp:1.0
docker buildx build --platform linux/amd64,linux/arm64 --tag quader.example.com/web/docker-local/myapp:1.0 --push .
podman manifest push --all myapp quader.example.com/web/docker-local/myapp:1.0
docker pull quader.example.com/web/docker/myapp@sha256:<hex> # by digest
Quader stores a manifest as sent: Docker schema 2 manifests and lists, OCI manifests and indexes, each at most 4 MiB; schema 1 is refused. Podman without --all sends only the index, which is refused with MANIFEST_BLOB_UNKNOWN. A moved tag leaves its old image pullable by digest, so a deployment pinned to a digest keeps starting. One tag per push request.
Signing tools push their signatures, attestations and SBOMs as referrers or cosign's .sig, .att and .sbom tags; they belong to the image and leave with it. Sign by digest with a token that may deploy (Signatures).
| Class | What a client meets |
|---|---|
| Local | What you push |
| Remote | The upstream's images under their upstream names (nginx and library/nginx are one image on Docker Hub); a tag is asked again after the metadata period. No push or delete (405 UNSUPPORTED) |
| Virtual | A tag from the first local member that has it, then from the remote members in order; a digest wherever its bytes are; tags and referrers merged. Quader-Resolved-From names the member. A push goes to the deployment target (403 DENIED without one), no delete (405) |
A remote lists a tag once a client pulled it; a HEAD is no pull. Of a multi-platform image the size counts the platforms fetched, marked ≥.
Kubernetes
The Docker CLI's Configure step has an image pull secret built from the variable, best with a service account's token that may only read:
printf '{"auths":{"%s":{"username":"quader","password":"%s"}}}' quader.example.com/web/docker "${QUADER_TOKEN}" | \
kubectl create secret generic quader-registry --type=kubernetes.io/dockerconfigjson --from-file=.dockerconfigjson=/dev/stdin # example
Name it under imagePullSecrets; the kubelet sends it only for images below the prefix. After the token is rotated, create the secret again.
Delete
The Docker CLI cannot delete; skopeo delete, crane delete or curl -X DELETE can, with delete and the image name's ownership:
| Request | Removes |
|---|---|
DELETE /v2/<project>/<repository>/<name>/manifests/<tag> |
the tag; the manifest stays |
DELETE …/manifests/sha256:<hex> |
the manifest, its tags, referrers and signature tags, and an index's platform manifests nothing else names |
DELETE …/blobs/sha256:<hex> |
a layer no manifest references |
A manifest an index lists, or a layer still referenced, answers 409 DENIED. A layer nothing references is swept after oci.unreferenced_blob_grace; an untagged manifest stays until deleted.
Settings
- Who
- the project's Owner, and holders of
repositories:write-config
The key appears in every image reference, so choose one that reads well there (docker-local, docker-hub). Registry clients sign in with HTTP Basic, so auth.clients.basic.enabled stays on. A local or virtual OCI repository has no settings of its format. A remote offers Docker Hub (the default), Quay, GitHub (ghcr.io) and GitLab, with a metadata period and a remembered "not found" of 300 seconds each.
- Docker Hub gets
auth.docker.ioas a further host that receives the credential. It limits pulls per address, and every client behind Quader shares one: give the remote a Docker Hub account and access token whenever more than a few pulls an hour go through it, always for a mirror. A stale tag is checked with aHEAD, which costs no pull. - Another registry whose token service lives on another host: Test connection names that host and offers Allow; without it pulls fail with
foreign_host_denied. - Platforms (default
linux/amd64,linux/arm64, empty is every platform): what the remote downloads ahead of a multi-platform tag a client asked about, and what a mirror copies. Each platform manifest is a pull at Docker Hub; untick Start the download when a version is asked for when the allowance is tight. - Tags to mirror (
latest) and Tags never mirrored, read in the mode Mirror (Mirror). Docker Hub and ghcr.io offer no catalog, so a mirror reads the exact names of Mirror only these packages. A mirror of Docker Hub needs patterns that start with a literal part, or a storage limit.
Every manifest and layer is stored only when its digest matches, else 502.
A Docker Engine mirror on a bound host
A Docker Engine pulls Docker Hub images through registry-mirrors, at the root of a host. Bind a host of its own to one repository, a remote of Docker Hub or a virtual over one, on an endpoint (Endpoints), give it a certificate the engines trust, and point them at it:
endpoints: # values of the chart, example
default:
hosts: [quader.example.com, mirror.example.com]
hostRoots: {mirror.example.com: web/docker-hub}
{ "registry-mirrors": ["https://mirror.example.com"] }
On the bound host /v2/<name>/… is that repository with the name as sent. Whether an engine sends its docker login credential to a mirror is not verified; a repository anonymous readers may read needs none. A Bastion whose address is the bound host serves the mirror the same way (Bastion).
Not available
- An endpoint with exposure rules serves no images; a Bastion does, at its own address.
- No search:
/v2/_cataloglists names only. - No retention of untagged manifests; mirrors copy no referrers but signatures and attestations, and no index inside an index.
- A local repository keeps no
sha256-<digest>fallback tags of the older referrers scheme; use the referrers API.