Safeguard
Developer Tools•

Which registry does an image name without a host pull from?

A name with no registry host resolves to Docker Hub in Docker and Kubernetes by default. Podman can search several registries. Write the full host.

Safeguard Security Team
3 min read

By default, Kubernetes assumes the Docker public registry when an image name has no registry host, and Podman expands names like alpine to docker.io/library/alpine. Podman can also search a list of registries you configure. The safe habit is to write the full host in every reference so no default decides for you.

What the docs say

Kubernetes documents that image names can include an optional registry hostname and port, and that with no hostname it assumes the Docker public registry. It adds that you can change this by setting a default image registry in the container runtime configuration.

Podman documents a short-name as an image reference without a registry portion. Unqualified names are expanded through aliases or through a list called unqualified search registries, set in registries.conf. If Podman runs in a terminal and no alias matches, it asks you to pick from the default registries and caches your choice.

So two tools, one name, and the answer depends on configuration you may never have looked at.

Why a default is a risk

Short names are exposed to namespace squatting. The Podman documentation says so directly: if a public registry is searched first, an attacker could take over the matching namespace and serve an image that was meant for your private registry. That is the container version of dependency confusion.

You do not need a sophisticated attacker for this to hurt. A teammate adds a registry to a search list for convenience, a new machine is set up with different defaults, and the same short name now points somewhere else.

A fix you can apply today

  1. Search your repositories for image references that start with no host. In Dockerfiles that means FROM lines, and in manifests it means image fields.
  2. Rewrite each one with the full registry host, namespace and repository.
  3. Add the digest once you have reviewed the image.
  4. Add a review check or policy gate that flags a new reference with no host.

For Podman users, short-name aliases map a short name to a fully qualified reference, which removes the ambiguity of searching several registries. Distributions often ship defaults in the registries.conf.d folder, and administrators can add their own.

Where this fits in a bigger plan

If your team uses an internal registry or a cache, fully qualified names are how you make sure traffic goes through it. A short name leaves the choice to defaults, and defaults tend to point at the public registry. Qualified names plus a rule that blocks unknown hosts give you something you can actually audit.

Try it yourself

Click through it at your own pace, or open it full screen. Watch how a pull request gate can stop a change before it merges, which is where a new host-less image reference should be caught.

Quick check

Does Kubernetes always pull a host-less image from Docker Hub?

By default, yes, because it assumes the Docker public registry. The default can be changed in the container runtime configuration.

What is the simplest way to avoid the ambiguity?

Write the full registry host in every image reference, then pin the digest.

Safeguard policies and gates can check changes in pull requests, and its dependency scanning and SBOM cover the images you end up using. Start with a free scan at gold.safeguard.sh/scan.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.