pull access denied for postgress, repository does not exist or may require 'docker login' — Docker asked the registry for an image it could not get. Most of the time the image name is misspelled; check it letter by letter first. If the name is right, the image is private (log in) or lives on a different registry (put the registry host in front of it).

In the reproduction below the fix was one deleted letter: postgress became postgres, and the same command ran.

The error

docker run --rm postgress:18
Unable to find image 'postgress:18' locally
docker: Error response from daemon: pull access denied for postgress, repository does not exist or may require 'docker login'

Run 'docker run --help' for more information

Why it happens

docker run first looks for the image locally; when it is missing, the engine tries to pull it. A name without a registry host goes to Docker Hub, and a single-word name such as postgress is looked up among the official images. Docker Hub answers the same way whether the repository does not exist or exists but is private to an account you are not logged in as, so the engine cannot tell you which of the two it was. That is why the message names both possibilities.

Three real causes produce it:

  • A typo in the image name, as here. By far the most common.
  • A private image on Docker Hub: run docker login with an account that has access, then pull again.
  • The wrong registry: the image lives on another registry (GitHub, Azure, Microsoft's mcr.microsoft.com) but the name has no host, so Docker asked Docker Hub. Use the full name, for example mcr.microsoft.com/dotnet/sdk:10.0.

The fix

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

Only the name changed. If you are not sure of the spelling, search Docker Hub with docker search or on the website, and copy the name from the image page rather than typing it. If the tag is wrong but the name is right, you get a different error, not found for the reference, instead of this one.

How it was reproduced

On Windows 11 with Docker Desktop 4.91 (client and engine 29.8.2), from PowerShell 5.1, not logged in to any registry. docker run --rm postgress:18 failed with exit code 125 after the local lookup missed. docker run --rm postgres:18 --version then printed the server version from the cached postgres:18 image (PostgreSQL 18.4).

Frequently asked

What does pull access denied repository does not exist mean?
Docker could not pull the image from the registry. Either the name is wrong, the repository is private and you are not logged in, or the image is on a different registry than the one Docker asked.
Do I need docker login to fix pull access denied?
Only if the image is private. For a public image such as postgres, check the spelling first; logging in does not help with a name that does not exist.
How do I pull an image from a registry other than Docker Hub?
Put the registry host at the start of the name, for example mcr.microsoft.com/dotnet/sdk:10.0. Without a host Docker always asks Docker Hub.

More decoded errors in the Fixes category. New to images and registries? See Docker explained for beginners.