20

No matter what I do, I only ever get a 404 or Error: invalid reference format

I think it should be podman pull hub.docker.com/_/postgres

but this doesn't work. I've also tried

podman pull hub.docker.com/postgres

podman pull hub.docker.com/__/postgres

podman pull hub.docker.com/library/postgres

Any ideas what's needed here to grab any of the official images from Docker Hub?

antonyh
  • 2,131
  • 2
  • 21
  • 42

2 Answers2

51

In order to pull images from Docker Hub using podman, the image name needs to be prefixed by the docker.io/ registry name.

To get the 'official images' they are part of the 'library' collection.

So to pull Postgres from Docker Hub using Podman, the command is

podman pull docker.io/library/postgres
mirekphd
  • 4,799
  • 3
  • 38
  • 59
antonyh
  • 2,131
  • 2
  • 21
  • 42
  • It doesn't work for me, I get "connection reset by peer". I have also successfully logged in before. – woof Aug 25 '22 at 01:35
  • "connection reset by peer" is usually a local network problem or firewall (especially corporate, possibly some ISPs) - you might have more luck on a different network or it might be something at Docker Hub. Sorry I can't help you with this – antonyh Sep 06 '22 at 21:35
5

Either follow the other answer and use a fully-qualified image name or you can add docker.io to your set of unqualified search registries:

/etc/containers/registries.conf

unqualified-search-registries = ["mylocalregistry:5005", "docker.io"]

This will make it possible to use docker.io as a fall back with unqualified image names like:

podman pull nginx
Jonathan Komar
  • 2,678
  • 4
  • 32
  • 43
  • 1
    That works, but it needs to be: ``` unqualified-search-registries = ["mylocalregistry:5005", "docker.io"] ``` (dashes instead of underscores) – EyeSpy Feb 17 '23 at 10:18