Docker and Podman both build container images and run containers, and their commands are almost identical. The difference is underneath: Docker usually works through a background service called a daemon, while Podman has no daemon and is built to run containers without root.
What both of them do
A container packs an app with its dependencies, so it runs the same on a laptop, a CI server and production. Both tools cover the same everyday jobs:
- Build an image from a Dockerfile (Podman reads the same file, sometimes named a Containerfile).
- Pull images from registries such as Docker Hub.
- Run, stop and inspect containers.
Both build images to the same open standard from the Open Container Initiative (OCI), so an image built with one runs on the other. If containers are new to you, start with Docker explained and come back.
Docker: a daemon does the work
Docker uses a client-server design. The docker command you type is only a client. It sends your request to a daemon: a background service, dockerd, that is always running and waiting for commands. The daemon pulls images, creates containers and keeps track of them.
That design has real strengths. Every tool, from the CLI to IDE plugins to CI systems, talks to one service in one way, and the daemon can restart containers by itself when the machine reboots.
It also has costs. The daemon is one long-running process standing behind every container, and on a standard install it runs as root, the all-powerful system user. Anyone who can send commands to it can effectively act as root on the machine, which is why adding a user to the group is treated as giving them root access. Docker does offer a rootless mode, but it is extra setup, not the default.
Wondering how this was made? How we make these