# Podman — Daemonless Container Engine for OCI Containers > Podman is a daemonless, open-source tool for developing, managing, and running OCI containers and pods. Drop-in replacement for Docker CLI without requiring a root daemon. Used by Red Hat, Fedora, and increasingly adopted in enterprise environments. ## Install Save as a script file and run: ## Quick Use ```bash # Install brew install podman # macOS sudo apt install podman # Debian/Ubuntu sudo dnf install podman # Fedora/RHEL # Initialize machine (macOS/Windows need a VM) podman machine init podman machine start ``` Docker-compatible commands: ```bash podman pull nginx:alpine podman run -d --name web -p 8080:80 nginx:alpine podman ps podman logs web podman exec -it web sh podman stop web podman rm web podman images podman build -t myapp . podman push myapp docker.io/user/myapp # Pods (group containers like K8s pods) podman pod create --name mypod -p 8080:80 podman run -d --pod mypod nginx:alpine podman run -d --pod mypod redis:alpine podman pod ps # Generate K8s YAML from running pod podman generate kube mypod > pod.yaml # Rootless mode (default) podman run --rm alpine id # uid=0 inside, non-root outside ``` ## Intro Podman is a daemonless, open-source tool for managing OCI containers and pods on Linux, macOS, and Windows. Developed by Red Hat as an alternative to Docker. Podman uses the same CLI commands as Docker but runs without a persistent daemon (each container is a child process of the podman command) and supports rootless containers by default. - **Repo**: https://github.com/containers/podman - **Stars**: 31K+ - **Language**: Go - **License**: Apache 2.0 ## What Podman Does - **Docker-compatible CLI** — `alias docker=podman` works - **Daemonless** — no background service, each container is a fork/exec - **Rootless** — run containers as non-root by default - **Pods** — group containers that share network namespace (like K8s pods) - **Systemd integration** — generate systemd units from containers - **K8s YAML** — generate and play Kubernetes YAML - **Compose** — podman-compose or docker-compose with podman socket - **Image building** — via Buildah (integrated) - **Multi-arch** — cross-platform image builds - **Podman Desktop** — GUI for managing containers ## Architecture Forkexec model: `podman run` forks a conmon process that supervises the container runtime (crun or runc). No daemon = no single point of failure. Storage uses containers/storage (overlayfs). Networking uses CNI or netavark. ## Self-Hosting CLI tool. ## Key Features - Docker CLI compatibility - Daemonless architecture - Rootless containers - Pod support (like K8s) - Systemd unit generation - K8s YAML import/export - Buildah integration - Podman Desktop GUI - Remote API (REST) - Multi-arch builds ## Comparison | Tool | Daemon | Rootless | Pods | CLI | |---|---|---|---|---| | Podman | No | Default | Yes | Docker-compatible | | Docker | Yes (dockerd) | Optional | No | docker | | nerdctl | No (containerd) | Yes | Yes | Docker-compatible | | Lima | VM-based | Yes | No | Docker-compatible | ## 常见问题 FAQ **Q: 能完全替换 Docker 吗?** A: 日常使用可以。`alias docker=podman` 大部分命令通用。Docker Compose 通过 podman-compose 或 podman socket 兼容。少数边缘功能有差异。 **Q: macOS 怎么用?** A: `podman machine init && podman machine start` 启动一个 Fedora CoreOS VM。体验和 Docker Desktop 类似但无需许可证费用。 **Q: 生产环境用?** A: Red Hat OpenShift 底层就是 CRI-O + Podman。RHEL、Fedora 默认用 Podman 替换 Docker。 ## 来源与致谢 Sources - Docs: https://docs.podman.io - GitHub: https://github.com/containers/podman - License: Apache 2.0 --- Source: https://tokrepo.com/en/workflows/c457ca38-3638-11f1-9bc6-00163e2b0d79 Author: Script Depot