Skip to main content
In this lesson, you’ll learn how Docker interprets image names when you pull or reference them. Understanding these conventions helps you avoid naming conflicts and ensures you’re pulling or pushing images to the correct registry.

Pulling an Image

For example, running:
might look simple—but what does httpd actually represent, and where does Docker retrieve it from?

Docker Image Naming Components

A complete Docker image reference can include up to three parts:

Implicit Namespace

When you specify only httpd, Docker assumes you want the official image from Docker Hub’s library namespace.
Effectively, Docker interprets:
Here, library is the namespace for curated, official images on Docker Hub, and httpd is the repository name.

Default Registry

By default, Docker pulls from Docker Hub (docker.io). Omitting the registry is shorthand for:
The registry is where images are stored. When you build and push an image, it goes to this registry; when you pull, it comes from here.
You can verify the full reference of an existing image with:

Referencing Other Registries

If your image lives in a different registry—such as Google Container Registry or a private registry—you must prepend the registry hostname:
Before interacting with private registries, authenticate using:
Always ensure you’re logged in to the correct registry. Pushing to the wrong registry can overwrite critical images.

Watch Video