Software & OS

Podman vs Docker: Differences, Rootless Mode and Which to Use

Podman and Docker both run OCI containers from the same images, and their commands are close enough that most users can alias docker to podman. The main difference is architecture: Docker sends every command to a background daemon (dockerd), while Podman is daemonless and can run containers as a normal user.

If you already know Docker, try Podman on a Linux machine with this and see how far your existing habits carry:

alias docker=podman
docker run --rm docker.io/library/alpine echo "hello from a container"

What is the difference between Podman and Docker?

The table below covers the differences that affect day-to-day use. Each row is backed by the vendor documentation listed under Sources.

TopicDockerPodman
ArchitectureClient (docker) talks to a daemon (dockerd) over a REST APIDaemonless; described as a "daemonless, open source, Linux native tool"
Who runs containersDaemon-based; rootless mode is a separate setup that runs the daemon as a non-root userContainers can be run by root or by a non-privileged user
Command linedockerFamiliar to Docker users; most can alias docker to podman
ComposeDocker Compose, bundled with Docker Desktoppodman compose, a thin wrapper around an external provider
Windows and macOSDocker Desktop bundles the daemon, client, Compose and KubernetesRequires a virtual machine, managed with podman machine
PodsNot part of the core model (Kubernetes is a separate tool)Manages pods, containers, images and volumes through the libpod library

Daemon vs daemonless: what it means in practice

Docker uses a client-server design. When you run docker run, the client forwards the request to the daemon, which listens for Docker API requests and manages images, containers, networks and volumes. The two talk over a REST API, through a UNIX socket on the same machine or a network interface from a remote one. One client can talk to more than one daemon.

Podman has no such background service. The command you type does the work. Two consequences follow:

  • There is no central process whose crash or upgrade affects every container's management plane.
  • Tools that expect the Docker socket (some CI runners, IDE plugins and monitoring agents) may need a Podman-specific setup, since there is no dockerd to connect to. Check each tool's documentation rather than assuming it works.

If you are new to what a container is in the first place, what Docker containers are covers the basics, and Docker vs a virtual machine explains how containers differ from VMs.

Rootless: Podman by default, Docker by setup

Podman's documentation says containers "can either be run by root or by a non-privileged user", so running as your own user is a normal way to use it. Docker offers the same idea as rootless mode, which runs both the daemon and the containers inside a user namespace. The Docker documentation contrasts this with userns-remap, where the daemon still runs as root.

Setting up Docker rootless, per the Docker documentation:

  • Install newuidmap and newgidmap, usually from the uidmap package.
  • Make sure your user has at least 65,536 subordinate UIDs and GIDs in /etc/subuid and /etc/subgid.
  • As a non-root user, run dockerd-rootless-setuptool.sh install. If the script is missing, install the docker-ce-rootless-extras package.
  • Confirm with docker info that the client context is rootless.

Rootless Podman has its own limits, listed by the Podman project:

  • Ports below 1024. Rootless Podman cannot create containers that bind to ports under 1024, because the kernel blocks processes without CAP_NET_BIND_SERVICE. You can lower the threshold with the net.ipv4.ip_unprivileged_port_start sysctl, or forward traffic from a privileged port with a proxy or firewall rule.
  • subuid and subgid. If /etc/subuid and /etc/subgid are not configured for your user, Podman commands can fail.
  • Networking. Since Podman 5.0, pasta is the default networking tool. Connections from containers to the host's main interface IP do not work, so container-to-container traffic generally needs explicit pasta configuration unless the host has more than one interface. Rootless bridge networks use rootlessport for port forwarding, which does not preserve client source IPs.

The Docker rootless page links to a separate troubleshooting page for its own limitations, which this article did not check. Read it before choosing rootless Docker for a production host.

Can Podman run Docker images and Docker Compose files?

Images: yes. Podman works with OCI containers and images, and relies on an OCI-compliant runtime such as runc or crun to start them. A container image built with Docker is an OCI image.

Compose files: Podman does not implement Compose itself. podman compose is "a thin wrapper around an external compose provider such as docker-compose or podman-compose". It sets up the environment so the provider can reach the local Podman socket, then passes your command and arguments straight through. If both providers are installed, docker-compose is used first. You can change that with the compose_providers field in the [engine] table of containers.conf, or with the PODMAN_COMPOSE_PROVIDER environment variable.

podman compose up -d

So a Compose file that works with Docker Compose usually has a path to working with Podman, but you are depending on a provider, and the behavior of that provider matters. For Compose basics, see Docker Compose explained.

Podman vs Docker on Windows and macOS

Containers rely on the Linux kernel, and neither Windows nor macOS has one. Podman's documentation says so directly: "Podman on MacOS and Windows requires a virtual machine." The podman machine command group creates, starts, stops and removes that VM, and handles SSH access, file copying and inspection. On Linux a machine is optional.

Docker handles the same problem with Docker Desktop, an installable application for Mac, Windows or Linux that bundles the daemon, client, Docker Compose, Kubernetes and other tools. If you choose Docker on Windows, installing Docker Desktop on Windows walks through setup.

Running containers as services: systemd and Quadlet

On Linux, Podman containers are commonly run under systemd. The older podman generate systemd command is deprecated. Its documentation says it "will receive urgent bug fixes but no new features" and recommends Quadlet files for running containers or pods under systemd. If you find a tutorial that uses podman generate systemd, check whether it has a Quadlet version.

Which should you use?

Neither is better for every case. Use the facts above to decide:

  • Pick Podman if you work on Linux, want containers to run as your own user by default, and do not want a long-running daemon.
  • Pick Docker if you want one installer with Compose and Kubernetes included on Windows or macOS, or if your team's tooling is built around the Docker daemon and socket.
  • Either works if you only pull images, run containers and build from a Dockerfile. Those commands carry over between the two.

Kubernetes is a separate question from either tool. Kubernetes vs Docker explains how they fit together.

If a Docker command fails in Podman

Start with the cause that matches the symptom. A bind to port 80 or 443 failing for a non-root user is the privileged-port limit above. A command failing about user namespaces points at missing /etc/subuid or /etc/subgid entries. A container that cannot reach a service on the host's main IP is the pasta networking limit. A tool that wants the Docker socket needs a Podman-aware setup, so look in that tool's documentation.

Frequently asked questions

Is Podman a drop-in replacement for Docker?
For everyday commands, mostly yes. Podman's command line is designed to be familiar to Docker users, and its documentation says most users can alias docker to podman. Differences show up around Compose (Podman calls an external provider), rootless networking, and anything that depends on the Docker daemon or its socket.
Does Podman need a daemon?
No. Podman is daemonless: each podman command runs the container tooling directly instead of sending a request to a long-running background service. Docker uses a client and a daemon (dockerd) that communicate over a REST API.
Can Podman run on Windows and macOS?
Yes, but through a virtual machine. Podman's documentation states that Podman on macOS and Windows requires a virtual machine, because containers depend on the Linux kernel. The podman machine commands create and manage that VM.
Is Podman more secure than Docker?
Podman's default is a different trade-off, not an automatic win. It has no root daemon and can run containers as a normal user. Docker can also run its daemon and containers without root through rootless mode, but you have to set that up. Both still share the host's Linux kernel.
Can Podman run Docker images?
Yes. Podman works with OCI containers and images, and uses an OCI-compliant runtime such as runc or crun to start them. Images built for Docker are OCI images and run in Podman.

Sources