skip to content

What makes `postgres` on Docker Hub a Docker Official Image, and how do the publisher tiers differ?

level: juniorimportance: must knowfreq 64%

answer

  1. Not every image on the hub is equal
  2. The name itself tells you the namespace
  3. A bare name means the library namespace
  4. Official, Verified Publisher, Sponsored OSS, community
  5. Curation is provenance, not a safety guarantee

basics

~20 s

Docker Official Images are a curated set in Docker Hub's reserved library namespace, which is why they pull by a bare name like postgres. Verified Publisher and Sponsored OSS images come from an identity-checked vendor; everything else is unreviewed.

solid answer

~40 s

`docker pull postgres` expands to `docker.io/library/postgres:latest`. The `library` namespace is reserved for the Docker Official Images programme, so a single-word image name is itself the signal: the Dockerfile and entrypoint script are public, reviewed by a maintainer team, follow shared conventions (documented environment variables, a `docker-entrypoint.sh`, variant tags such as `-alpine` or `-bookworm`), and get rebuilt when their own base changes. A slash in the name means somebody's account or organisation. Of those, **Verified Publisher** and **Sponsored Open Source** images carry a badge attesting that the account really belongs to that vendor or project; a plain `someuser/postgres` carries nothing at all. Treat the tier as evidence of *provenance and packaging discipline*, not as a guarantee that the image is current, minimal, or safe for your threat model.

go deeper

for a junior

Be ready to say what a Docker Official Image is and how you recognise one: a bare, single-word name on Docker Hub resolving into the reserved library namespace. Know that a name with a slash belongs to somebody's account.

for a middle

Explain the mechanics: how a reference expands to docker.io/library/<name>:latest, what the programme actually reviews, and the shared conventions Official Images follow — documented environment variables, an entrypoint script, and variant tags.

for a senior

Show the judgement: state what a badge does and does not attest to, and describe what you check in a third-party image before it goes near production — documentation, entrypoint, the user it runs as, variant, and whether you mirror it internally.

for a principal

Own the policy angle. Decide which registries and tiers teams may pull from, whether third-party images are mirrored internally, and how an exception gets approved — so the choice is not made per-team by whoever read a blog post.

### The name already tells you something A Docker image reference is `registry/namespace/repository:tag`. When you type `docker pull postgres`, the client fills in the defaults and pulls `docker.io/library/postgres:latest`. That `library` namespace is not a convention anybody can join — it is reserved by Docker for the **Docker Official Images** programme. This is why Official Images are the only images on Docker Hub you can pull by a bare, single-word name, and why the presence or absence of a slash in an image reference is the fastest trust signal available at the command line. `postgres` and `someuser/postgres` are two completely unrelated repositories, and a candidate who thinks the second is just a mirror of the first has missed the point. ### The tiers, in order of how much has been checked **Docker Official Images.** A curated set covering databases, web servers, caches, language runtimes and base distributions. Their Dockerfiles, entrypoint scripts and documentation live in public repositories, are reviewed by a dedicated maintainer team rather than merely uploaded, and follow shared conventions across the whole set: a documented list of environment variables, a `docker-entrypoint.sh` that turns those variables into configuration, an initialization hook directory for stateful services, and a consistent tag-variant naming scheme (a Debian release name such as `-bookworm`, or `-alpine` for the Alpine-based build). They are also rebuilt when the base they are built on is refreshed, so a given tag is not frozen forever. Upstream projects usually participate, but the packaging is reviewed by the programme. **Verified Publisher.** Published by the company that owns the software, under an account Docker has verified. The badge is an *identity* attestation: this really is that vendor's account, not a lookalike. It says nothing about whether the image follows the Official Images conventions — many do not, and the environment-variable contract, the user it runs as, and the data directory can be entirely different. **Sponsored Open Source.** The same identity attestation applied to an open-source project accepted into the programme, publishing under its own namespace. **Everything else.** Any account can push any image. Nobody reviews it, the Dockerfile may not be published anywhere, the repository may be abandoned, and the name may be a typosquat one character away from something popular. Pull counts and stars are a popularity measure, not a review. ### What a tier is not A badge is provenance, not a safety certificate. It does not mean the image has no known vulnerabilities, does not mean it packages the newest upstream release, does not mean it runs as a non-root user, and does not tell you what its entrypoint script will do on first start. Package freshness and scanning are separate disciplines with their own tooling; the trust tier answers only *who stands behind this artefact and was the packaging reviewed*. ### What to actually check before you run somebody else's image 1. **The repository documentation.** Which environment variables are required, which are read only on first start, which ports it listens on, where it writes data, and what it does with arguments you pass after the image name. 2. **The entrypoint.** For an Official Image you can read `docker-entrypoint.sh` in the public repository; that script, not the daemon, implements most of the image's behaviour. 3. **The user it runs as.** Some images drop privileges internally, some run everything as root, and that changes the ownership of anything they write into a mounted directory. 4. **The variant tag.** `-alpine` and `-bookworm` style suffixes select which distribution the image was assembled on, which decides which C library and which debugging tools exist inside it. 5. **Whether your organisation already mirrors it internally,** which most do for availability and rate-limit reasons. ### Why it bites in practice The failure mode is rarely dramatic. A team wiring up a subscription-billing cron adds a cache to their compose stack, types a community `someuser/redis-alpine` because it appeared in a blog post, and now depends on an image whose last push was 19 months ago, whose Dockerfile nobody can read, and whose entrypoint ignores the environment variables the real image documents. Nothing breaks on day one; it breaks the first time somebody needs to change a setting or explain the artefact to an auditor. Preferring the reserved-namespace image, or the vendor's own verified repository, costs nothing at the time and removes an entire class of later argument.

  • What do suffixes like `-alpine` and `-bookworm` mean on an Official Image tag such as `postgres:16-bookworm`?
    They name the distribution the image was assembled on — `bookworm` is a Debian release name, `alpine` is Alpine Linux. The packaged software is the same version; what differs is the C library, the package manager, and which shell and diagnostic tools exist inside when you go looking. For a service image you are running rather than building on, the practical consequences are size and what is available to troubleshoot with.
  • Does the Docker Official Image badge mean the image is safe to run as-is?
    No. It means the packaging was reviewed and the provenance is known. It says nothing about whether the packaged version is current, whether known vulnerabilities exist in it, whether it runs as root, or whether its defaults suit your environment. You still read the documentation, set the configuration it expects, restrict what it can reach, and keep it updated.
  • How can you tell which repository a bare name like `redis` actually resolves to?
    The client expands it to `docker.io/library/redis` — Docker Hub's reserved Official Images namespace — and the pull output plus `docker image inspect` show the fully qualified reference it stored. Any name containing a slash before the repository, such as `acme/redis`, is an account or organisation repository and has nothing to do with the Official Image.

The tiers work like shelves in a shop: the library namespace is the shelf the shop stocks and inspects itself, a Verified Publisher shelf is stocked by the brand whose ID was checked at the door, and everything else is a table anyone may leave a box on.

saying these in an interview costs you the question

  • Thinking Docker itself writes the software in an Official Image
  • Believing an Official Image is guaranteed free of vulnerabilities
  • Assuming every image on Docker Hub is reviewed by somebody
  • Treating `postgres` and `someuser/postgres` as the same repository
  • Using pull counts or stars as a substitute for provenance
  • Thinking Verified Publisher means the library team maintains it

context