Linux command
podman-compose 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start services
podman-compose up
Start in background
podman-compose up -d
Stop services
podman-compose down
View logs
podman-compose logs
Build images
podman-compose build
List containers
podman-compose ps
Execute command in service
podman-compose exec [service] [command]
说明
podman-compose is a thin Python re-implementation of docker compose that drives podman instead of the Docker daemon. It reads docker-compose.yml / compose.yaml / podman-compose.yml files (Compose specification 1.x and 3.x) and translates them into a series of `podman run`, `podman build`, and `podman network create` commands, so it works rootless and without a daemon. Modern Podman (4.0+) also ships native `podman compose` (with a space), which delegates to either podman-compose or docker compose depending on what is available — both eventually call the same Podman API.
FAQ
What is the podman-compose command used for?
podman-compose is a thin Python re-implementation of docker compose that drives podman instead of the Docker daemon. It reads docker-compose.yml / compose.yaml / podman-compose.yml files (Compose specification 1.x and 3.x) and translates them into a series of `podman run`, `podman build`, and `podman network create` commands, so it works rootless and without a daemon. Modern Podman (4.0+) also ships native `podman compose` (with a space), which delegates to either podman-compose or docker compose depending on what is available — both eventually call the same Podman API.
How do I run a basic podman-compose example?
Run `podman-compose up` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more podman-compose examples?
This page includes 7 examples for podman-compose, plus related commands for nearby Linux tasks.