Why Podman
Podman is a daemonless container engine. Same CLI as Docker, but no root daemon running. Rootless containers, pods (like K8s pods), and systemd integration.
Install
brew install podman
podman machine init
podman machine start
Docker-Compatible CLI
# Pull and run (same as docker)
podman pull nginx:latest
podman run -d -p 8080:80 --name web nginx
podman ps
podman logs web
podman stop web
# Build images
podman build -t myapp:latest .
# Compose
podman compose up -d
Pods (Kubernetes-Style)
# Create a pod
podman pod create --name myapp -p 8080:80 -p 5432:5432
# Add containers to pod
podman run -d --pod myapp --name web nginx
podman run -d --pod myapp --name db postgres:16
# Containers in the pod share localhost
# web can reach db at localhost:5432
Generate Kubernetes YAML
# From running pod/container to K8s manifest
podman generate kube myapp > deployment.yaml
# Play K8s YAML locally
podman kube play deployment.yaml
Rootless Containers
# Run as non-root user (default)
podman run --rm alpine id
# uid=0(root) gid=0(root) — root INSIDE container, non-root OUTSIDE
Key Features
- Daemonless — no background process
- Rootless — containers run as your user
- Docker compatible — alias docker=podman
- Pods — group containers like K8s
- K8s YAML — generate and play manifests
- Systemd — generate systemd services from containers
Resources
Need to extract container data, image info, or registry metadata? Check out my Apify tools or email spinov001@gmail.com for custom solutions.
Top comments (0)