Podman Operations

Concept

Podman is a daemonless container engine. It can run containers as root or as a normal user (rootless).
Command-line usage is deliberately similar to Docker in many cases.

Why it matters

  • Many modern Linux distributions favour Podman over Docker.
  • Rootless mode changes networking, storage paths, and permission behaviour.
  • Useful for local development and for environments that want to avoid a root daemon.

Mental Model

Docker-style CLI
    ↓
Podman (no central daemon)
    ↓
containers / pods / images (per user or system)

Rootless containers run inside a user namespace, so UIDs/GIDs and some network features behave differently from rootful containers.

Key Commands

# Basic lifecycle (very similar to Docker)
podman ps
podman ps -a
podman images
podman run -it --rm <image> /bin/sh
podman logs <container>
podman exec -it <container> /bin/sh
podman stop / start / rm <container>
 
# System / rootless info
podman info
podman system df
 
# Generate systemd units (useful for services)
podman generate systemd --name <container> --files

Rootless vs Rootful differences

AreaRootfulRootless
PrivilegeRuns as rootRuns as normal user
NetworkFull host network capabilityOften uses slirp4netns / pasta
Storage pathSystem locationsUnder user’s home (~/.local/share/containers)
Port bindingAny portPorts ≥ 1024 without extra config
SecurityHigher risk if compromisedBetter isolation by default

Common Failure Modes & Symptoms

SymptomLikely causeFirst checks
Permission denied on volumesUID mapping in rootless modepodman unshare cat /proc/self/uid_map
Cannot bind low portsRootless restrictionUse higher ports or rootful
Networking from container failsRootless network stackpodman info, try --network host for testing
Storage / disk issuesUser container storage fullpodman system df

Investigation Tips

  • podman and docker commands are often interchangeable for basic use, but behaviour diverges with rootless, pods, and systemd integration.
  • For services that should survive logout, use podman generate systemd or quadlet.
  • When debugging rootless problems, check the user namespace mappings and the storage location under the user’s home.

Personal Lessons Learned