npx skills add https://github.com/knoopx/pi --skill podman与 Docker 命令兼容的无根容器管理。
# 运行容器(后台模式)
podman run -d --name my-app alpine sleep 1000
# 列出正在运行的容器
podman ps
# 列出所有容器(包括已停止的)
podman ps -a
# 停止并移除容器
podman stop my-app
podman rm my-app
# 检查容器详情
podman inspect my-app
# 查看容器日志(非交互式)
podman logs my-app
# 在运行中的容器内执行命令
podman exec my-app ls /app
# 拉取镜像
podman pull alpine:latest
# 列出本地镜像
podman images
# 从 Containerfile(或 Dockerfile)构建镜像
podman build -t my-custom-image .
# 移除镜像
podman rmi my-custom-image
Pods 允许将多个容器分组,使它们共享相同的网络命名空间(localhost)。
# 创建 Pod
podman pod create --name my-stack -p 8080:80
# 在 Pod 内运行容器
podman run -d --pod my-stack --name nginx nginx
# 列出 Pods
podman pod ps
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# 移除所有已停止的容器、未使用的网络和悬空镜像
podman system prune -f
# 显示容器/镜像的磁盘使用情况
podman system df
rm、rmi 和 prune 命令中使用 -f 或 --force 以避免确认提示。-d 以防止命令挂起。对于交互式会话,可以使用:tmux new -d 'podman run -it --name my-app alpine sh'docker 命令都可以用 podman 作为前缀来替代。# 创建网络
podman network create my-network
# 在网络上运行容器
podman run --network my-network --name web nginx
# 将现有容器连接到网络
podman network connect my-network web
# 列出网络
podman network ls
# 检查网络
podman network inspect my-network
# 创建密钥
echo "my-secret-value" | podman secret create my-secret -
# 列出密钥
podman secret ls
# 在容器中使用密钥
podman run --secret my-secret,type=env,target=MY_SECRET alpine env
# 运行带健康检查的容器
podman run -d --health-cmd "curl -f http://localhost/ || exit 1" \
--health-interval 30s --health-retries 3 \
--name web nginx
# 检查健康状态
podman inspect web | grep -A 10 "Health"
# 运行带自动更新策略的容器
podman run -d --label "io.containers.autoupdate=registry" \
--name web nginx
# 检查更新
podman auto-update
# 应用更新
podman auto-update --dry-run=false
Podman 可以为容器生成 systemd 服务文件:
# 创建 .container 文件
cat > ~/.config/containers/systemd/my-app.container << EOF
[Container]
Image=nginx:latest
PublishPort=8080:80
EOF
# 生成 systemd 服务
podman generate systemd --new --files --name my-app
# 启用并启动
systemctl --user enable --now container-my-app.service
# 原生 podman compose 支持
podman compose up -d
podman compose down
podman compose logs
# 或使用 podman-compose(第三方工具)
pip install podman-compose
podman-compose up -d
# 从容器/Pod 生成 Kubernetes YAML
podman generate kube my-pod > pod.yaml
# 运行 Kubernetes YAML
podman kube play pod.yaml
# 停止并移除 Kubernetes 资源
podman kube down pod.yaml
# 将构建任务分发到远程机器
podman farm build -t myimage .
# 列出已配置的 farms
podman farm list
# 推送 OCI 制品
podman artifact push myartifact.tar oci://registry.example.com/artifact
# 拉取 OCI 制品
podman artifact pull oci://registry.example.com/artifact
每周安装次数
76
代码仓库
GitHub 星标数
20
首次出现
2026年1月23日
安全审计
安装于
opencode69
gemini-cli65
codex65
github-copilot64
cursor61
amp59
Rootless container management compatible with Docker commands.
# Run a container (detached)
podman run -d --name my-app alpine sleep 1000
# List running containers
podman ps
# List all containers (including stopped ones)
podman ps -a
# Stop and remove a container
podman stop my-app
podman rm my-app
# Inspect container details
podman inspect my-app
# View container logs (non-interactive)
podman logs my-app
# Execute a command in a running container
podman exec my-app ls /app
# Pull an image
podman pull alpine:latest
# List local images
podman images
# Build an image from a Containerfile (or Dockerfile)
podman build -t my-custom-image .
# Remove an image
podman rmi my-custom-image
Pods allow grouping multiple containers together so they share the same network namespace (localhost).
# Create a pod
podman pod create --name my-stack -p 8080:80
# Run a container inside a pod
podman run -d --pod my-stack --name nginx nginx
# List pods
podman pod ps
# Remove all stopped containers, unused networks, and dangling images
podman system prune -f
# Show disk usage by containers/images
podman system df
-f or --force with rm, rmi, and prune to avoid confirmation prompts.-d for long-running services to prevent the command from hanging. For interactive sessions, use: tmux new -d 'podman run -it --name my-app alpine sh'docker commands can be prefixed with podman instead.# Create a network
podman network create my-network
# Run container on a network
podman run --network my-network --name web nginx
# Connect existing container to network
podman network connect my-network web
# List networks
podman network ls
# Inspect network
podman network inspect my-network
# Create a secret
echo "my-secret-value" | podman secret create my-secret -
# List secrets
podman secret ls
# Use secret in container
podman run --secret my-secret,type=env,target=MY_SECRET alpine env
# Run container with health check
podman run -d --health-cmd "curl -f http://localhost/ || exit 1" \
--health-interval 30s --health-retries 3 \
--name web nginx
# Check health status
podman inspect web | grep -A 10 "Health"
# Run container with auto-update policy
podman run -d --label "io.containers.autoupdate=registry" \
--name web nginx
# Check for updates
podman auto-update
# Apply updates
podman auto-update --dry-run=false
Podman can generate systemd service files for containers:
# Create a .container file
cat > ~/.config/containers/systemd/my-app.container << EOF
[Container]
Image=nginx:latest
PublishPort=8080:80
EOF
# Generate systemd service
podman generate systemd --new --files --name my-app
# Enable and start
systemctl --user enable --now container-my-app.service
# Native podman compose support
podman compose up -d
podman compose down
podman compose logs
# Or use podman-compose (third-party tool)
pip install podman-compose
podman-compose up -d
# Generate Kubernetes YAML from container/pod
podman generate kube my-pod > pod.yaml
# Play Kubernetes YAML
podman kube play pod.yaml
# Stop and remove Kubernetes resources
podman kube down pod.yaml
# Farm out builds to remote machines
podman farm build -t myimage .
# List configured farms
podman farm list
# Push OCI artifacts
podman artifact push myartifact.tar oci://registry.example.com/artifact
# Pull OCI artifacts
podman artifact pull oci://registry.example.com/artifact
Weekly Installs
76
Repository
GitHub Stars
20
First Seen
Jan 23, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykWarn
Installed on
opencode69
gemini-cli65
codex65
github-copilot64
cursor61
amp59
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
111,700 周安装
二进制初步分析指南:使用ReVa工具快速识别恶意软件与逆向工程
69 周安装
PrivateInvestigator 道德人员查找工具 | 公开数据调查、反向搜索与背景研究
69 周安装
TorchTitan:PyTorch原生分布式大语言模型预训练平台,支持4D并行与H100 GPU加速
69 周安装
screenshot 截图技能:跨平台桌面截图工具,支持macOS/Linux权限管理与多模式捕获
69 周安装
tmux进程管理最佳实践:交互式Shell初始化、会话命名与生命周期管理
69 周安装
Git Rebase Sync:安全同步分支的Git变基工具,解决冲突与备份
69 周安装