$ command-helper

Podman

Daemonless, rootless containers with Docker-compatible commands, pods, systemd units and the macOS VM.

Requires Google sign-in

Basics (same as Docker)

Run a container
podman run -d --name <container> -p 8080:80 docker.io/library/nginx

Use full image names: Podman doesn't assume docker.io by default.

Containers, including stopped
podman ps -a
Logs and shell
podman logs -f <container>
Make docker commands use Podman
alias docker=podman
Compose files
podman compose up -d

Pods

Create a pod (shared network for its containers)
podman pod create --name <podman_pod> -p 8080:80
Run a container inside the pod
podman run -d --pod <podman_pod> docker.io/library/nginx
Export a pod as Kubernetes YAMLadvanced
podman kube generate <podman_pod> > pod.yaml
Run Kubernetes YAML locallyadvanced
podman kube play pod.yaml

Rootless and systemd

Run as a systemd service via Quadletadvanced
# ~/.config/containers/systemd/web.container
[Container]
Image=docker.io/library/nginx
PublishPort=8080:80

[Install]
WantedBy=default.target

# then: systemctl --user daemon-reload && systemctl --user start web
Keep user services running after logoutadvanced
loginctl enable-linger $USER

macOS / Windows VM

Create and start the Podman VM
podman machine init && podman machine start
Clean up unused images and containers
podman system prune -a