10.2 Docker Hub
A focused guide to Docker Hub, connecting core concepts with practical Docker and container operations.
Docker Hub is Docker's own, widely used public registry, serving as the default registry for docker pull and the home of a vast collection of official images, community-published images, and organization-hosted repositories, both public and private.
Pulling From Docker Hub by Default
Without specifying any other registry, an image reference is assumed to refer to Docker Hub.
docker pull postgres:16
This is equivalent to explicitly specifying Docker Hub's address, which is simply omitted by convention since it's the default.
Official Images Maintained on Docker Hub
Docker Hub hosts a curated set of "official" images for widely used software, generally maintained with particular care around security and documentation quality.
docker pull node:20-alpine
docker pull postgres:16
docker pull nginx:alpine
These official images, recognizable by their lack of a namespace prefix, represent some of the most widely used and broadly trusted images on Docker Hub.
Publishing Your Own Images to Docker Hub
An individual or organization can create their own namespace on Docker Hub, publishing images under their own account or organization name.
docker login
docker push myusername/myapp:1.0
Public Versus Private Repositories on Docker Hub
A free Docker Hub account can typically host public repositories without limit, while private repositories (along with certain other features) may require a paid plan, depending on Docker Hub's current offering.
docker pull myusername/private-project:1.0
Pulling a private repository like this requires prior authentication, regardless of the fact that it's hosted on the otherwise publicly accessible Docker Hub.
Why Docker Hub Matters
As the default, most widely used container registry, Docker Hub plays a foundational role in the broader container ecosystem, hosting both the official images many projects depend on and a vast range of community and organization-published content.