Join our Discord Server

Docker Hub Cheatsheet

← All cheatsheets
RegistryBeginner

Docker Hub Cheatsheet

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


What it is

Docker Hub is Docker’s official public registry. Use it to discover official images, store private images, automate builds from GitHub, and share images with your team.

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 namespace.

docker search ubuntu

Search Docker Hub for images.

Common commands

TaskCommandDescription
Logindocker loginAuthenticate with Docker Hub.
Logoutdocker logoutRemove stored credentials.
Pull imagedocker pull <image>:<tag>Download an image from Docker Hub.
Push imagedocker push <user>/<image>:<tag>Upload an image to your namespace.
Search imagesdocker search <term>Search the Docker Hub catalog.
Tag imagedocker tag <image> <user>/<repo>:<tag>Tag a local image for pushing.

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

Best practices

  • Use specific tags (not :latest) for production pulls for reproducibility.
  • Enable vulnerability scanning with Docker Scout on your Hub repos.
  • Use organisations and teams to control access to private repos.

Related cheatsheets


Last reviewed: 2026-06-15
Join our Discord Server