Docker vs Podman: Rootless Security and Systemd on Linux
This deep-dive covers docker vs podman rootless linux with actionable analysis, practical implications, and expert insights.
Architectural Difference: Central Daemon vs Fork-Exec Model
Docker uses a client-server architecture: the docker CLI sends REST requests to dockerd, a long-running daemon that typically executes with full root privileges. If a user has access to the docker group, they effectively hold root-equivalent control over the host. Podman removes the central daemon entirely. Each container is spawned directly via a fork-exec model under your unprivileged Linux user using user namespaces (subuid and subgid).
Architecture and Feature Comparison
| Feature | Docker Engine 27 | Podman 4.9 / 5.x |
|---|---|---|
| Architecture | Central daemon (dockerd) | Daemonless (fork-exec) |
| Default Privilege Model | Root daemon (rootless optional) | Rootless by default |
| Systemd Integration | Daemon manages restart policies | Native Quadlet .container units |
| Kubernetes Pod Support | Separate containers via Compose | Native pods & podman kube play |
| Compose Support | Built-in docker compose v2 | podman-compose or socket bridge |
| GPU Passthrough | --gpus all via toolkit | CDI (--device nvidia.com/gpu=all) |
Hands-On: Running a Rootless Container in Podman
Install Podman on Ubuntu 24.04 LTS and verify your subordinate UID ranges are configured:
sudo apt update
sudo apt install -y podman uidmap slirp4netns
grep "$USER" /etc/subuid /etc/subgid
Launch an Nginx container without sudo, mapped to an unprivileged host port:
podman run -d --name web-rootless -p 8080:80 docker.io/library/nginx:alpine
podman ps
ps -ef | grep nginx
Notice that the container process runs under your regular user account on the host, while appearing as UID 0 inside the isolated user namespace.
Native Systemd Management with Podman Quadlets
One of Podman's strongest advantages on Linux servers is Quadlet. Instead of relying on a separate container daemon to restart crashed services, you drop a declarative .container file into ~/.config/containers/systemd/ and let systemd manage boot order, health checks, and journalctl logs.
# ~/.config/containers/systemd/redis.container
[Unit]
Description=Rootless Redis Cache
After=network-online.target
[Container]
Image=docker.io/library/redis:7-alpine
PublishPort=127.0.0.1:6379:6379
Volume=redis-data:/data:Z
[Service]
Restart=always
[Install]
WantedBy=default.target
Reload user systemd units and start the service:
systemctl --user daemon-reload
systemctl --user start redis.service
systemctl --user status redis.service
loginctl enable-linger "$USER"
Enabling linger ensures your rootless containers start at boot and stay running after you log out of SSH.
Common Gotchas When Switching from Docker to Podman
- Short image names: Podman prompts or requires fully qualified names like
docker.io/library/postgres:16unless configured in/etc/containers/registries.conf. - Privileged ports (< 1024): Rootless containers cannot bind to ports 80 or 443 unless you lower
net.ipv4.ip_unprivileged_port_start=80via sysctl or terminate traffic with a host reverse proxy. - Bind mount ownership: Files created inside a rootless container map to subordinate UIDs on the host; use
podman unshare chownor named volumes to keep permissions clean.
Which One Should You Pick?
Pick Podman for security-sensitive Linux hosts, RHEL/Fedora/Debian production servers, and teams that want containers managed as native systemd services without a root daemon. Pick Docker for local developer workstations, multi-service Compose stacks, and AI GPU workloads where turnkey NVIDIA toolkit integration saves setup time.
Was this technical analysis helpful?
Your feedback informs our benchmark updates and ongoing article audits.
FAQ
Frequently Asked Questions
Structured for search engines and AI answer systems (AEO/GEO).
Yes. Both Docker and Podman follow the Open Container Initiative (OCI) standard, so images built with one engine run seamlessly on the other.
Yes, Docker offers dockerd-rootless-setuptool.sh, though it requires extra setup and disables some features like AppArmor profiles or certain overlayfs options depending on the kernel. Podman was designed rootless from day one.
Yes. You can either run podman-compose or enable the user Podman socket (systemctl --user enable --now podman.socket) and point the official docker compose CLI at it via DOCKER_HOST.
Docker has the smoothest turnkey setup with nvidia-container-toolkit, while Podman supports GPUs via Container Device Interface (CDI) specs generated with nvidia-ctk cdi generate.
More answers in our FAQ hub.
Newsletter
Practical Linux & Applied AI Newsletter
Get new tested tutorials and benchmark comparisons delivered directly to your inbox. Zero spam.
Join Weekly guides readers getting our weekly digest.
- Practical Linux administration & terminal workflows
- Tested open-source AI setups & benchmarks
- Zero spam - unsubscribe anytime