$ alias docker=podman

Podman

Podman is an open-source container engine from Red Hat that builds, runs and manages OCI containers without a central daemon. Its CLI is deliberately Docker-compatible: most docker ... commands work as podman ..., and many people simply alias docker=podman.

It is the default container tool on RHEL, Fedora and CentOS Stream, and Podman Desktop is a free GUI alternative to Docker Desktop on macOS and Windows.

How it differs from Docker

With Docker, the CLI talks to dockerd, a long-running daemon that usually runs as root and is the parent of every container. With Podman, each podman run forks the container directly (through conmon and a low-level runtime such as crun or runc). There is no daemon to crash, upgrade or secure.

$ podman run -d --name pg docker.io/library/postgres:18
Root daemon versus fork/exec
DOCKER PODMAN alice $ docker run alice $ podman run docker.sock dockerd root · always running pg web one root daemon owns every container socket access = root on the host fork/exec conmon uid 1000 · per container pg · started by crun no daemon: a child of your session podman exits, conmon stays root in pg = uid 1000 host systemd pg.container Quadlet
  1. The same user, Alice, starts a container with each tool. The commands look identical.
  2. The Docker CLI only sends a request over a socket to dockerd, a long-running daemon that usually runs as root.
  3. Every container is a child of that daemon. Whoever can write to the socket can effectively act as root on the host.
  4. Podman has no daemon: it forks a small conmon monitor, crun starts the container under it, and the podman command exits.
  5. Rootless by default: a user namespace maps root inside the container to Alice's own UID on the host.
  6. For services that must start on boot, a Quadlet .container file lets systemd launch and restart the container like any other unit.
Docker Podman
Architecture Client + dockerd daemon Daemonless, fork/exec per container
Default privileges Daemon runs as root (rootless mode optional) Rootless by default for normal users
Pods No Yes: groups of containers sharing a network namespace, like Kubernetes
Kubernetes YAML No podman kube generate / podman kube play
Run as a service Restart policies in the daemon Quadlet: .container files become systemd units
Compose docker compose podman compose (wraps a Compose provider) or the Docker-compatible API socket
Image format OCI / Docker OCI / Docker (same images, same registries)

Rootless containers

In rootless mode, “root” inside the container is mapped to your normal user ID on the host through user namespaces. If an attacker escapes the container, they land as an unprivileged user, not as host root. This is the main reason security-sensitive teams and shared build machines prefer Podman.

Trade-offs: ports below 1024 need extra config, and some storage and networking paths are slower than rootful mode (newer kernels and pasta networking have closed most of the gap).

Pods: a small Kubernetes on one host

podman pod create --name pipeline -p 5432:5432
podman run -d --pod pipeline --name db -e POSTGRES_PASSWORD=dev postgres:17
podman run -d --pod pipeline --name loader my-registry/loader:1.4   # reaches db at localhost:5432
podman kube generate pipeline > pipeline.yaml                        # Kubernetes-ready YAML

Containers in a pod share localhost, exactly like containers in a Kubernetes Pod. That makes Podman a handy way to prototype a Pod locally.

Same labs with Podman

Every docker command from the Docker hands-on lab works with podman in its place. The differences you will hit:

podman machine init        # macOS / Windows only, once: creates the Linux VM
podman machine start
podman run -d --name pg -e POSTGRES_PASSWORD=secret \
  -p 5432:5432 -v pgdata:/var/lib/postgresql \
  docker.io/library/postgres:18
podman exec -it pg psql -U postgres
  • Full image names. docker.io/library/postgres:18 skips the “which registry?” prompt for short names.
  • Rootless ports. On Linux, host ports below 1024 need extra setup. Publish 8080, not 80.
  • Networks. podman network create labnet gives the same name-based discovery as Docker; or put both containers in one pod and use localhost.
  • Compose. podman compose up -d reads the same compose.yaml (it calls docker-compose or podman-compose, whichever is installed).
  • Alias. alias docker=podman covers nearly all day-to-day commands; Podman Desktop can also expose a Docker-compatible socket for tools that expect one.

When to use Podman

  • Linux servers and CI runners where you want no root daemon.
  • Long-running services on a single host: Quadlet lets systemd start, restart and log containers like any other service.
  • Teams avoiding Docker Desktop licensing on laptops (Podman Desktop is Apache-2.0).

Stick with Docker when your tooling assumes the Docker socket and you do not want to test compatibility, or when you rely heavily on Docker-specific features such as Docker Build Cloud or Docker Scout.

Common mistakes

  • Expecting --restart=always to survive reboots. Without a daemon, nothing restarts containers on boot unless systemd does it. Use Quadlet, or enable podman-restart.service.
  • Short image names. podman pull postgres may prompt for or resolve a registry differently than Docker. Use full names like docker.io/library/postgres:17.
  • Mixing rootful and rootless storage. Images pulled with sudo podman are not visible to your user, and vice versa.

Learning Resources

Official

Books

Videos

Most Docker learning material applies directly; see Docker.