Basics
Three concepts
Section titled “Three concepts”| Concept | What it is |
|---|---|
| Image | A read-only template: a filesystem plus metadata (command to run, ports, environment). Built from a Dockerfile / Containerfile. |
| Container | A running (or stopped) instance of an image, with its own writable layer, processes and network. |
| Registry | A server that stores images: Docker Hub (docker.io), Quay (quay.io), GitHub (ghcr.io), Amazon ECR… |
An image name has this shape:
registry/namespace/name:tagdocker.io/library/nginx:1.27If you leave out the tag, latest is used. Pin a specific tag for anything you care about.
Docker vs Podman
Section titled “Docker vs Podman”| Docker | Podman | |
|---|---|---|
| Architecture | Client + a background daemon (dockerd) running as root |
No daemon: each container is a child process of the command that started it |
| Rootless | Optional | The default |
| Commands | docker … |
Same syntax: podman … |
| Compose | docker compose |
podman compose (uses podman-compose or docker-compose underneath) |
| Pods | No | Yes, groups of containers sharing network, like Kubernetes pods |
The command line is compatible, so every command in this section works with either tool: just swap docker for podman. Many people simply add:
alias docker=podmanCheck that it works
Section titled “Check that it works”docker versiondocker run --rm hello-worldpodman info / docker info show storage, registries and whether you’re running rootless.
Short image names in Podman
Section titled “Short image names in Podman”Docker assumes docker.io when you write nginx. Podman may ask which registry you mean. Use the full name to avoid the prompt:
podman pull docker.io/library/nginx:1.27