Podman
Daemonless, rootless containers with Docker-compatible commands, pods, systemd units and the macOS VM.
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 -aLogs and shell
podman logs -f <container>
Make docker commands use Podman
alias docker=podmanCompose files
podman compose up -dPods
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.yamlRootless 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 webKeep user services running after logoutadvanced
loginctl enable-linger $USERmacOS / Windows VM
Create and start the Podman VM
podman machine init && podman machine startClean up unused images and containers
podman system prune -a