← All insightsCheat Sheet

Podman cheat sheet: the complete command reference

CodeWizard Engineering · 14 July 2025 · 3 min read · Beginner

This is a complete, hands-on Podman cheat sheet: install, configure, operate, automate and secure it - with copy-paste commands grouped by task. Bookmark it for day-to-day work, incidents and interviews alike.

Podman runs OCI containers without a central daemon and supports rootless containers by default, with a Docker-compatible CLI and the ability to generate Kubernetes YAML from pods.

Why you reach for it

  • Daemonless and rootless by default for better security
  • Drop-in docker CLI compatibility (alias docker=podman)
  • Can generate Kubernetes YAML from local pods

Installation

bash
sudo apt-get install -y podman   # or brew install podman
podman info
alias docker=podman

Configuration reference

Run a rootless container and generate a systemd unit.

bash
podman run -d --name web -p 8080:80 nginx:alpine
podman generate systemd --new --name web > ~/.config/systemd/user/web.service
systemctl --user enable --now web

Core commands you use daily

bash
podman ps
podman pod create --name app -p 8080:80
podman generate kube app > app.yaml

Containers & pods

bash
podman run -d --name web -p 8080:80 nginx:alpine
podman ps
podman pod create --name app -p 8080:80
podman generate kube app > app.yaml

Systemd integration

bash
podman generate systemd --new --name web > ~/.config/systemd/user/web.service
systemctl --user enable --now web
podman build -t ghcr.io/acme/web:latest .

Use it in CI/CD

Build and push with Buildah/Podman in CI.

yaml
- run: podman build -t ghcr.io/acme/web:$GITHUB_SHA .
- run: podman push ghcr.io/acme/web:$GITHUB_SHA

Best-practice checklist

  • Prefer rootless containers and Quadlet/systemd for services
  • Use podman generate kube to bridge to Kubernetes
  • Pin base images and scan them like with Docker

Common pitfalls to avoid

  • Assuming 100% Compose parity (use podman-compose or Quadlet)
  • Rootless port <1024 binding issues
  • Mixing docker and podman socket expectations in tooling

Security quick wins

  • Run rootless and drop capabilities
  • Scan images (Trivy) and use read-only rootfs

Works well with

  • Docker - Package an app and its dependencies into a portable image that runs the same everywhere.
  • Kubernetes - Declarative orchestration for containers at scale - self-healing, rolling updates and service discovery.
  • Trivy - A fast, all-in-one scanner for container images, filesystems, IaC and Kubernetes.
A cheat sheet is muscle memory on paper - keep it close until the commands live in your fingers.

Want senior help putting Podman to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult