Image, Container, Registry
The Three Words That Explain Docker
| Term | What it is | Analogy |
|---|---|---|
| Image | Read-only template: filesystem + metadata | A class / a recipe |
| Container | A running (or stopped) instance of an image | An object / a baked cake |
| Registry | Server that stores and distributes images | GitHub, but for images |
One image can run as many containers - each gets its own thin writable layer on top of the shared read-only image.
$ docker pull nginx:1.27-alpine # registry → local image
$ docker run nginx:1.27-alpine # image → running container
$ docker push myrepo/myapp:v1 # local image → registry
Image names decode as registry/repository:tag:
nginx:1.27-alpine→ Docker Hub (default registry), reponginx, tag1.27-alpineghcr.io/org/api:v2→ GitHub's registry, repoorg/api, tagv2
Warning: The taglatestis just a naming convention - it is not guaranteed to be the newest version, and it changes underneath you. Production deployments pin exact tags (or digests), neverlatest.
Goal: Ready to run your first container? Head to the Run Your First Container lab in the Docker track - you get a real Docker daemon and a live browser preview of what you deploy.