Docker Hub is the public Docker image registry. Think of it as npm for Node.js or PyPI for Python, but for containers.
What’s Available
- Official language images:
python,node,golang,ruby - Databases:
postgres,mysql,mongodb,redis - Web servers:
nginx,apache - Operating systems:
ubuntu,debian,alpine
100+ million images. Official images are marked with a checkmark ✓ and have no username prefix in their name.
Image Name Structure
[username/]repository[:tag]
python # official Python, latest tag
python:3.11 # Python 3.11
python:3.11-slim # lightweight variant
python:3.11-alpine # Alpine Linux based (smallest)
myuser/myapp:v1.0 # your own image
Tags:
- latest — most recent version (default)
- slim — fewer packages, smaller size
- alpine — Alpine Linux based (~5 MB base), most compact
- Specific version: 3.11, 3.11.2
Always pin a specific tag in production — latest can break your build on update.
Commands
docker search python # search for images
docker pull python:3.11 # pull an image
docker tag myapp:latest myuser/myapp:v1.0 # tag an image
docker push myuser/myapp:v1.0 # publish
docker login # authenticate
Publishing Your Own Image
- Create an account at hub.docker.com
- Log in:
docker login - Tag the image:
docker tag myapp username/myapp:v1.0 - Push:
docker push username/myapp:v1.0
Free account: unlimited public repositories, 1 private.
Rate Limits
Anonymous users: 100 pulls per 6 hours. Authenticated users: 200 pulls per 6 hours. For CI/CD, use docker login with an access token.
💬 Comments (0)
No comments yet
Be the first to share your opinion about this article!