← All cheatsheets
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
Authenticate with Docker Hub.
Pull an official image.
Push an image to your namespace.
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. |
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.0Best 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