← 返回命令列表

Linux command

podman 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Run a container

podman run [image]

List running containers

podman ps

List all containers

podman ps -a

Pull an image

podman pull [image]

Build from Dockerfile

podman build -t [tag] [path]

Stop a container

podman stop [container]

Remove a container

podman rm [container]

说明

podman is a daemonless, rootless container engine that manages OCI-compliant containers and images. Unlike Docker, it does not require a background daemon process, and containers can run entirely as an unprivileged user. The CLI is designed to be drop-in compatible with Docker, supporting familiar commands like run, build, pull, ps, stop, and rm. Podman also supports pods (groups of containers sharing namespaces), which align with Kubernetes pod concepts. Developed by Red Hat, it uses Buildah for image building and crun/runc as the container runtime.

参数

run
Run a container.
ps
List containers.
pull
Pull an image.
build
Build image from Containerfile.
stop
Stop container.
rm
Remove container.
images
List images.
exec
Execute in container.
-d, --detach
Run in background.

FAQ

What is the podman command used for?

podman is a daemonless, rootless container engine that manages OCI-compliant containers and images. Unlike Docker, it does not require a background daemon process, and containers can run entirely as an unprivileged user. The CLI is designed to be drop-in compatible with Docker, supporting familiar commands like run, build, pull, ps, stop, and rm. Podman also supports pods (groups of containers sharing namespaces), which align with Kubernetes pod concepts. Developed by Red Hat, it uses Buildah for image building and crun/runc as the container runtime.

How do I run a basic podman example?

Run `podman run [image]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does run do in podman?

Run a container.