skip to content

Artifact Management

Where build outputs live between CI and production: repository managers, registries, version rules, promotion and proxies. Interviewers probe it because every pipeline stands on it.

on this pageshow

explore

questions

page 1 of 2

In an OCI registry, how are blobs, manifests and tags stored and addressed, and which of the three can change after a push?

level: juniorimportance: must knowfreq 60%

answer

  1. three kinds of object per repository
  2. a name computed from the bytes
  3. /v2/<name>/blobs/<digest>
  4. pointer, not content

basics

~20 s

An OCI registry addresses blobs and manifests by digest, a hash of their exact bytes, so neither can change under its name. A tag is a human-readable pointer to one manifest digest, and it is the one name a later push can move.

solid answer

~40 s

Inside a repository (the `<name>` in `/v2/<name>/...`) a registry holds three things. **Blobs** (layers, config documents, any file) are fetched at `/v2/<name>/blobs/<digest>`, where the digest, such as `sha256:...`, is the hash of the bytes. **Manifests** are JSON documents at `/v2/<name>/manifests/<tag-or-digest>`: an image manifest lists a config blob and layer blobs, and an image index lists manifests, for example one per platform. The registry must store a manifest in the exact bytes it received, so its digest is stable as well. **Tags** are human-readable pointers to a manifest digest; one manifest may carry zero, one or many tags. Pushing a different manifest under an existing tag moves the tag and leaves the old manifest pullable by digest, unless the registry has a tag-immutability setting that refuses it.

code

http · 11 lines
http
GET /v2/team/api/manifests/1.4.2
Accept: application/vnd.oci.image.index.v1+json, application/vnd.oci.image.manifest.v1+json

HTTP/1.1 200 OK
Content-Type: application/vnd.oci.image.manifest.v1+json
Docker-Content-Digest: sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270

GET /v2/team/api/blobs/sha256:9834876dcfb05cb167a5c24953eba58c4ac89b1adf57f28f2f9d09af107ee8f0

HTTP/1.1 200 OK
Docker-Content-Digest: sha256:9834876dcfb05cb167a5c24953eba58c4ac89b1adf57f28f2f9d09af107ee8f0

go deeper

for a junior

Recall the three objects, blob, manifest and tag, and that only the tag is a movable name. Say what a digest is computed from.

for a middle

Explain why the manifest must be stored byte for byte, and how the image manifest and image index refer to blobs and other manifests through descriptors.

for a senior

Separate the three deletes, tag, manifest and blob, and say which one actually frees storage and when. Show how moving a tag leaves the old manifest reachable by digest.

for a principal

Frame digest addressing as the property that makes deduplication, integrity checking and reproducible deployment the same design decision, and what a team gives up when it relies on tags.

## The three objects in a repository The OCI distribution specification defines a **registry** as a service answering a small HTTP API, and a **repository** as the scope for API calls on a collection of content: manifests, blobs and tags. Every path in the API starts with `/v2/<name>/`, where `<name>` is the repository namespace, for example `team/api`. Inside that repository, three kinds of thing matter: | Object | What it is | Addressed by | Endpoint | Can its content change? | |---|---|---|---|---| | **Blob** | Opaque bytes: a layer tarball, a config JSON, any file | Digest only | `/v2/<name>/blobs/<digest>` | No: new bytes are a new digest | | **Manifest** | A JSON document listing other content by descriptor | Digest or tag | `/v2/<name>/manifests/<tag-or-digest>` | No: the registry keeps the exact bytes | | **Tag** | A human-readable name for one manifest | Its own name | Used in place of a digest on the manifests endpoint | Yes: it can be re-pointed | ## Digests: names computed from content A **digest** has the form `algorithm:encoded`, for example `sha256:5b0bcabd...`. The image spec registers `sha256`, `sha512` and `blake3`, and implementations must support SHA-256 verification. Because the name is computed from the bytes: - the same bytes always get the same digest, which is why a registry can keep one stored copy of a layer that many images share; - a client that fetched by digest can hash what it received and prove the content is what it asked for; - the registry **must store a manifest in the exact byte representation the client sent**. Re-indenting the JSON would change the hash and break every reference to the old digest. Successful pull and existence-check responses carry a `Docker-Content-Digest` header with the digest of what was returned, a name kept from the API's origins in the Docker registry protocol. ## Manifests tie blobs together A manifest refers to other content through **descriptors**, each with a `mediaType`, a `digest` and a `size`. Two manifest kinds matter on the registry side: - an **image manifest** (`application/vnd.oci.image.manifest.v1+json`) names one config blob and an ordered list of layer blobs; - an **image index** (`application/vnd.oci.image.index.v1+json`) lists other manifests, typically one per platform, so one name can serve several architectures. Picking the right entry is the client's job; the registry just stores and serves the index. Because a manifest names its blobs by digest and is itself named by digest, the whole object forms a hash tree: one manifest digest pins every byte below it. ## Tags: the only movable name A **tag** is, in the spec's words, a custom, human-readable pointer to a manifest. Tags must match `[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127}`, so at most 128 characters, and `GET /v2/<name>/tags/list` returns them in lexical or ASCII order, paginated with `n`, `last` and a `Link` header. - A manifest digest may have **zero, one or many** tags. - A `PUT /v2/<name>/manifests/<tag>` with a different manifest **moves** the tag. The previous manifest is not modified; it stays in the repository and is still pullable by digest, now without that tag. - Refusing to move a tag is a **registry setting** (tag immutability), not a property of tags in the spec. ## Push order and what a delete removes A push runs in the reverse order of a pull: 1. Upload each blob (monolithic or chunked), usually after a `HEAD` on `/v2/<name>/blobs/<digest>` shows it is missing. 2. `PUT` the manifest. A registry may reject a manifest that references blobs it does not have, with `MANIFEST_BLOB_UNKNOWN`. 3. Name it: pushing the manifest by tag creates or moves that tag. Deletes come in three distinct phases, and a registry may disable any of them: 1. `DELETE /v2/<name>/manifests/<tag>` removes only the tag; the manifest stays. 2. `DELETE /v2/<name>/manifests/<digest>` removes the manifest, and every tag pointing at it then returns `404`. 3. `DELETE /v2/<name>/blobs/<digest>` removes a blob from the repository. Disk space comes back only when the registry's garbage collection removes bytes nothing references any more. ## What to take from it - Content in an OCI registry is immutable by construction; only the tag-to-digest mapping moves. - "Which image is `1.4.2`?" has a time-dependent answer; "which image is `sha256:...`?" never does. - Storage deduplication, integrity checks and pinning all fall out of the same design: names derived from content.

  • When a tag is moved to a new manifest, what happens to the manifest it used to point at?
    Nothing happens to its content. It stays in the repository and can still be pulled by digest; it simply no longer carries that tag (it may still carry others). Whether it is ever removed depends on the registry's deletion and garbage-collection setup, not on the push that moved the tag.
  • Why must the registry keep a manifest's exact bytes instead of re-serialising the JSON?
    The manifest's digest is the hash of its bytes. Re-serialising, even to semantically identical JSON with different whitespace or key order, would produce a different digest, so every reference pinned to the original digest, including an image index entry, would stop matching. The distribution spec therefore requires the exact byte representation the client pushed.
  • Can two repositories in the same registry share one stored copy of a blob?
    Yes. The API scopes each blob to a repository, but storage is content-addressed, so a registry can keep one copy and reference it from both. A client can even link an existing blob into another repository with a cross-repository mount instead of uploading it again.

Blobs and manifests are like books shelved under a fingerprint of their own text, so changed text is simply a different book. A tag is a 'book of the month' sign that staff can move to another book without altering either book.

  • A tag is a second stored copy of the image under another name.
  • Pushing to an existing tag rewrites the manifest the tag pointed at.
  • The registry assigns digests like database IDs, independent of content.
  • Deleting a tag immediately frees the disk space its layers used.
  • Each manifest can carry only one tag at a time.
  • A registry may reformat manifest JSON as long as the meaning is unchanged.
open as a page

In a Maven repository, how is an artifact's file path built from its groupId, artifactId, version, classifier and extension?

level: juniorimportance: must knowfreq 62%

basics

~10 s

A Maven repository turns coordinates into a path: the groupId with dots replaced by slashes, then artifactId and version directories, and a file named artifactId-version[-classifier].extension, with .md5 and .sha1 checksum files beside it.

open as a page

In a repository manager, what are staging and release repositories, and what does promoting an artifact between them mean?

level: juniorimportance: must knowfreq 62%

basics

~10 s

A staging repository holds candidate builds still under test; a release repository holds only approved versions. Promotion puts the exact same artifact into the release repository, or marks it released, without rebuilding it.

open as a page

What can a proxy repository still serve your builds when the public registry it caches goes down on release day?

level: juniorimportance: must knowfreq 68%

basics

~20 s

A proxy repository can still serve whatever it already cached: artifact files and, in products such as Artifactory and Harbor, its last copy of the metadata. Anything no build requested through it was never stored, so it fails until the upstream returns.

open as a page

In a repository manager such as Nexus Repository or Artifactory, what are hosted, proxy and group repositories, and what is each one for?

level: juniorimportance: must knowfreq 72%

basics

~20 s

A hosted repository stores the artifacts your organisation publishes as the authoritative copy; a proxy repository caches what clients fetch from one remote repository; a group repository puts several repositories of one format behind a single URL.

open as a page

What does a cleanup policy in a repository manager such as Nexus Repository or Artifactory do, and which criteria can it select components by?

level: juniorimportance: must knowfreq 62%

basics

~20 s

A cleanup policy is a scheduled rule in a repository manager that removes components matching criteria such as age, days since last download, release or pre-release status, a keep-newest-N count and name patterns. Nexus Repository configures none by default.

open as a page

In a package repository, why must a published release version never be overwritten with new contents, and how do servers enforce that?

level: juniorimportance: must knowfreq 70%

basics

~20 s

A release version promises that one name always means the same bytes. Overwriting it lets two builds of one version differ, so servers holding releases refuse a second upload and fixes ship as new versions.

open as a page

What does an npm registry's packument contain, and how do its dist-tags and dist fields lead a client to the tarball?

level: middleimportance: must knowfreq 55%

basics

~20 s

An npm packument is the registry's JSON document for one package: dist-tags map labels such as latest to version numbers, versions holds each version's manifest, and each manifest's dist object gives the tarball URL and its integrity hash.

open as a page

In a repository manager, how do copy, move and property-based promotion differ in storage, audit trail and what consumers can resolve?

level: middleimportance: must knowfreq 50%

basics

~20 s

Copy leaves the artifact in staging and release; move takes it out of staging; property-based promotion leaves it in place and changes metadata that consumers must filter on. They differ in disk use, history kept and who can still resolve it.

open as a page

Why does a proxy repository recheck cached metadata, such as a Maven version list, much sooner than the artifact files it caches?

level: middleimportance: must knowfreq 58%

basics

~20 s

A released artifact file is expected never to change, so its cached copy stays valid; metadata such as maven-metadata.xml or an npm packument changes every time the upstream publishes, so the proxy must refresh it to see new versions.

open as a page

In a repository manager, how do you scope read, deploy and delete rights, and why should CI publish with a token, not a password?

level: middleimportance: must knowfreq 58%

basics

~20 s

Grant rights per repository: wide read, deploy only to the hosted repositories a team owns, delete and admin to few. CI publishes as a dedicated non-human identity with a scoped, expiring, revocable token, so no person's password lives in pipelines.

open as a page

Why does a cleanup run in Nexus Repository not free disk space at once, and what finally reclaims it?

level: middleimportance: must knowfreq 52%

basics

~20 s

Nexus Repository cleanup only soft-deletes: it marks components for removal, hides them and leaves their blobs on disk, still recoverable. Disk space returns only when the Admin - Compact blob store task hard-deletes soft-deleted blobs, scheduled per blob store.

open as a page

In package and container registries, how does an immutable version differ from a mutable name such as an OCI tag or an npm dist-tag?

level: middleimportance: must knowfreq 60%

basics

~20 s

A version or digest names fixed content and never changes; an OCI tag or npm dist-tag is a pointer the registry lets you re-aim. Use the movable names for discovery and record versions or digests for builds and deploys.

open as a page

Artifactory's npm virtual repository lists the local repository first, yet a build got a public package carrying an internal name; why didn't order protect it?

level: seniorimportance: must knowfreq 55%

basics

~20 s

Order only says where a given file is looked for first; version metadata is merged from every member, so a higher public version of the same name can win. Exclude patterns or Priority Resolution, not order, keep internal names off the remote.

open as a page

What does an OCI registry do when a push asks to mount a blob from another repository instead of uploading it?

level: middleimportance: should knowfreq 30%

basics

~20 s

If it supports mounting and can find the blob, the registry links the existing blob into the target repository and answers 201 Created without receiving any bytes. Otherwise it answers 202 Accepted and opens an ordinary upload session instead.

open as a page

How does an OCI registry store something that is not a container image, such as a Helm chart, an SBOM or a model file?

level: middleimportance: should knowfreq 40%

basics

~20 s

As an ordinary OCI image manifest plus blobs: each file is uploaded as a layer blob with its own media type, and the artifact's type is declared in the manifest's artifactType field or, in older artifacts, by a type-specific config media type.

open as a page

What does a Python package index serve through the simple repository API, and how do its HTML and JSON forms differ?

level: middleimportance: should knowfreq 38%

basics

~20 s

A Python package index serves a project list and one page per normalized project name listing each file's URL and hash; the HTML form (PEP 503) uses links with data- attributes, the JSON form (PEP 691) the same facts as keys.

open as a page

How should repository permissions be split so CI can deploy to a staging repository but only a promotion identity can write to release?

level: middleimportance: should knowfreq 45%

basics

~20 s

Give the CI identity write access to staging and only read access to release, and give a separate promotion identity read on staging and write on release, with no overwrite or delete there. The repository manager then logs every promotion.

open as a page

Why can a proxy repository keep returning 404 for a package version that was published upstream only minutes ago?

level: middleimportance: should knowfreq 42%

basics

~20 s

A proxy repository remembers not-found answers for a while: a request made before the version existed cached the 404, and until that period ends the proxy does not ask the upstream again, so the new version stays invisible.

open as a page

How does an OCI registry running as a pull-through cache decide whether its cached copy of an image tag is still current?

level: middleimportance: should knowfreq 46%

basics

~20 s

On a pull by tag, a pull-through cache asks the upstream which manifest the tag points to now and fetches the new content if the tag moved; a pull by digest names fixed content, so the cached copy needs no freshness check.

open as a page

How does garbage collection in the open-source Distribution registry decide which blobs to delete, and why should writes stop while it runs?

level: middleimportance: should knowfreq 50%

basics

~20 s

Distribution registry garbage collection marks every digest that any manifest references, then sweeps and deletes every blob not marked. Writes must stop because a push uploads blobs before its manifest, so in-flight layers look unreferenced and get swept.

open as a page

In Harbor, how do tag immutability rules freeze release tags while letting moving tags such as latest keep changing?

level: middleimportance: should knowfreq 40%

basics

~20 s

Harbor tag immutability rules are project-level patterns over repositories and tags. A matching tag can no longer be re-pushed, re-tagged, overwritten by replication or deleted, so excluding moving tags such as latest keeps them mutable.

open as a page

An SBOM pushed to an OCI registry with a subject field naming an image is missing when a deploy job lists that image's referrers; what do you check?

level: seniorimportance: should knowfreq 25%

basics

~20 s

Check the job queries the same repository and the exact digest in the SBOM's subject, whether the registry serves the referrers API or the sha256-<hex> fallback tag was updated, and whether an artifactType filter or paging hides it.

open as a page

A CI build using a Maven version range keeps resolving 2.2.0 although 2.3.0's JAR and POM sit in the internal hosted repository; what do you check?

level: seniorimportance: should knowfreq 45%

basics

~20 s

Check the artifactId-level maven-metadata.xml: a version range is expanded from its <versions> list, not by listing directories, so a 2.3.0 that reached storage without a metadata update stays invisible to ranges while an exact 2.3.0 still resolves.

open as a page

In an OCI registry, images are promoted by copying the stg tag to prd, and production ran an image QA never tested; what happened and how do you fix promotion?

level: seniorimportance: should knowfreq 48%

basics

~20 s

Copying a tag copies whatever digest it points to at copy time. CI pushed a newer build to stg after approval, so that build was promoted. Promote the approved digest into a release repository CI cannot write, with immutable tags.

open as a page

Two Artifactory sites push-replicate the same local repositories to each other, and disk use keeps climbing at both; what is wrong, and how should cross-site sync work instead?

level: seniorimportance: should knowfreq 38%

basics

~20 s

This is cyclic replication, which Artifactory warns can lose data or grow disk use exponentially. Give each repository one direction: push from the owning site, pull to many sites, or use Federated repositories built for multi-site synchronisation.

open as a page

Three open-source distribution registry nodes share storage behind a load balancer; pulls work but pushes fail intermittently. What is the likely cause, and what must every node share?

level: seniorimportance: should knowfreq 30%

basics

~20 s

Each node generated its own HTTP secret because http.secret was unset, so an upload begun on one node fails when its next request reaches another. Nodes need the same storage and http.secret, and should share any configured cache.

open as a page

After an OCI registry garbage collection that also removed untagged manifests, new replicas of a production service cannot pull its digest-pinned image. What happened, and how do you prevent it?

level: seniorimportance: should knowfreq 42%

basics

~20 s

The pinned manifest's only tag moved to a newer build, leaving it untagged, so collection with untagged deletion removed it and swept its unique layers. Prevent it with a retained, never-moved tag per deployed digest and dry runs checked against deployments.

open as a page

After an internal library's version 2.4.1 was re-published with different contents and two services built different code from it, how do you prove it and prevent a repeat?

level: seniorimportance: should knowfreq 45%

basics

~20 s

Compare the hashes each service recorded at build time with what the repository serves now, and find the second upload in its history. Then make release repositories refuse redeploys and ship the fix as a new version.

open as a page

Would you make one OCI registry the store for your team's Helm charts, SBOMs and ML model files as well as its container images?

level: principalimportance: should knowfreq 30%

basics

~20 s

Usually yes, with conditions: the registry must accept arbitrary artifact types and serve the referrers API, its upload path must handle multi-gigabyte model blobs, and discovery, permissions and cleanup rules must be redesigned for content that is not an image.

open as a page

showing 1–30 of 37