failed to resolve reference "docker.io/library/postgres:99": docker.io/library/postgres:99: not found — the image exists but that tag does not. Look up the tags the image really publishes and use one of them; for PostgreSQL that is a major version such as 18 or 16, or a full version such as 18.4.

The repository name was right, so this is not a login or spelling problem with the name. Only the part after the colon needs to change.

The error

docker run --rm postgres:99
Unable to find image 'postgres:99' locally
docker: Error response from daemon: failed to resolve reference "docker.io/library/postgres:99": docker.io/library/postgres:99: not found

Run 'docker run --help' for more information

This is the wording Docker 29.8.2 printed; other Docker versions and registries word a missing tag differently, so search for the tag in your own message as well.

Why it happens

A reference is registry/repository:tag. Docker expanded postgres:99 to docker.io/library/postgres:99, found the image missing locally and asked Docker Hub for the manifest of tag 99. The repository answered, but it has no tag with that name, so the reference could not be resolved. Compare it with a misspelled image name, which fails earlier with pull access denied: there the repository itself is missing.

Tags are just labels the publisher chose. Common ways to end up with one that does not exist: a version that has not been released yet, a version number copied from another product, a suffix that the image never used (-alpine on an image that has no Alpine variant), or latest on an image whose publisher does not push a latest tag.

The fix

docker run --rm postgres:18 --version
postgres (PostgreSQL) 18.4 (Debian 18.4-1.pgdg13+1)

To see which tags exist, open the image's page on Docker Hub (the Tags tab lists every one) or the registry's own page for images hosted elsewhere. To see the tags you already have on your machine, run docker image ls postgres. Pin a major version (postgres:18) in compose files rather than latest, so an upgrade never arrives by surprise.

How it was reproduced

On Windows 11 with Docker Desktop 4.91 (client and engine 29.8.2), from PowerShell 5.1. docker run --rm postgres:99 failed with exit code 125 after Docker Hub reported the tag missing; docker run --rm postgres:18 --version then ran from the cached image and printed PostgreSQL 18.4.

Frequently asked

What does failed to resolve reference not found mean in Docker?
The image repository exists but the tag you asked for does not. Pick a tag the publisher actually pushes, for example postgres:18 instead of postgres:99.
How do I list the available tags of a Docker image?
Open the image on Docker Hub and use its Tags tab, or the registry page for images hosted elsewhere. docker image ls name lists only the tags already on your machine.
Why does docker run say Unable to find image locally before the error?
That line is normal: the image was not on your machine, so Docker tried to pull it. The real error is the line after it, which says the tag was not found on the registry.

More decoded errors in the Fixes category. Moving a database between major tags? Read the Postgres 16 to 18 data-files post first.