安裝 Podman
Podman 可以在多種作業系統上安裝,包括 Linux、macOS 與 Windows。
- Linux (Fedora / CentOS / RHEL):
sudo dnf install podman - Linux (Ubuntu / Debian):
sudo apt update && sudo apt install podman - macOS: 使用 Homebrew
brew install podman - Windows: 下載 Podman Desktop 或使用 WSL 2 安裝 Podman
確認安裝
- 查看 Podman 版本:
podman --version - 檢查系統環境:
podman info
Rootless 模式與使用者設定
Podman 支援 rootless 容器運行,增加安全性:
- 非 root 用戶即可建立與啟動容器
- 檢查 rootless 設定:
podman info | grep rootless
練習建議
- 在本地安裝 Podman,確認版本與安裝成功
- 嘗試使用 rootless 模式啟動簡單容器
- 熟悉 Podman CLI 的基本資訊指令