28

Not sure what I did, but now I'm getting

Error: short-name "postgres:14" did not resolve to an alias and no unqualified-search registries are defined in "/etc/containers/registries.conf"

When I try to run podman pull postgres:14. I can verify postgres:14 exists in dockerhub

1 Answer 1

50

This is a change in behavior, what they want you to do is write docker.io/

podman pull docker.io/postgres:14

You can see this documented in /etc/containers/registries.conf,

NOTE: RISK OF USING UNQUALIFIED IMAGE NAMES We recommend always using fully qualified image names including the registry server (full dns name), namespace, image name, and tag (e.g., registry.redhat.io/ubi8/ubi:latest). Pulling by digest (i.e., quay.io/repository/name@digest) further eliminates the ambiguity of tags. When using short names, there is always an inherent risk that the image being pulled could be spoofed. For example, a user wants to pull an image named foobar from a registry and expects it to come from myregistry.com. If myregistry.com is not first in the search list, an attacker could place a different foobar image at a registry earlier in the search list. The user would accidentally pull and run the attacker's image and code rather than the intended content. We recommend only adding registries which are completely trusted (i.e., registries which don't allow unknown or anonymous users to create accounts with arbitrary names). This will prevent an image from being spoofed, squatted or otherwise made insecure. If it is necessary to use one of these registries, it should be added at the end of the list.

You can see more information in man 5 containers-registries.conf


You can revert to old behavior with,

unqualified-search-registries = ["docker.io"]
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .