Join our Discord Server

Docker Hub Cheatsheet

← All cheatsheets

RegistryBeginner

Docker Hub Cheatsheet

The world’s largest container registry — search, pull, push, and automate image builds.


What it is

Docker Hub is Docker’s official public registry with millions of images. Use it to store, share, and distribute container images, automate builds, and discover official and community images.

Installation

No installation needed. Use docker login to authenticate from the CLI. Create a free account at hub.docker.com.

Quick start

docker login

Authenticate with Docker Hub.

docker pull nginx:alpine

Pull an official image.

docker push myuser/myapp:1.0

Push an image to your Docker Hub repo.

docker search ubuntu

Search Docker Hub for images.

Common commands

Task Command Description
Login docker login Authenticate with Docker Hub.
Logout docker logout Remove stored credentials.
Pull image docker pull <image>:<tag> Download an image from Docker Hub.
Push image docker push <user>/<image>:<tag> Upload an image to your namespace.
Search images docker search <term> Search the Docker Hub catalog.
Tag image docker tag <image> <user>/<repo>:<tag> Tag a local image for pushing.
List tags docker search <image> --no-trunc Browse available tags via Hub UI.

Real-world examples

Tag and push a custom image
docker build -t myapp:latest .
docker tag myapp:latest myuser/myapp:1.0
docker login
docker push myuser/myapp:1.0

Pull a specific platform image
docker pull --platform linux/arm64 nginx:alpine


Best practices

  • Use specific tags (not :latest) for production pulls to ensure reproducibility.
  • Enable vulnerability scanning on your Docker Hub repos with Docker Scout.
  • Use organisations and teams on Docker Hub to control access to private repos.
  • Set up Automated Builds to rebuild images when you push to GitHub.

Related cheatsheets


Last reviewed: 2026-06-15

Join our Discord Server