podman ps: List Running Containers
podman ps lists containers, by default the running ones, with their image, command, status, and ports.
podman ps is how you check whether a service container started in a pipeline. With --format you can pull the exact status field a health gate needs.
What it does
podman ps lists containers managed by Podman. Without -a it shows only running containers; with -a it shows all states including exited. It supports filters and Go template output for scripting.
Common usage
podman ps
podman ps -a
podman ps --filter "name=db" --format '{{.Names}} {{.Status}}'
podman ps -a --filter "status=exited" --format '{{.Names}} {{.ExitCode}}'Options
| Flag | What it does |
|---|---|
| -a, --all | Show all containers, not just running |
| -q, --quiet | Print only container IDs |
| --filter <f> | Filter, e.g. name=, status=, label= |
| --format <tmpl> | Go template, e.g. {{.Names}} {{.Status}} |
| --no-trunc | Do not truncate output (full IDs/commands) |
| -l, --latest | Show the most recently created container |
In CI
Gate on container health with podman ps --filter and a Go template instead of grepping human output. To wait for a service to be up, poll podman ps with --filter health=healthy if the image defines a HEALTHCHECK.
Common errors in CI
A container missing from podman ps but present in podman ps -a means it exited; check podman logs <name> and the {{.ExitCode}} field. An empty list under a different user is the rootless-vs-root store split: containers run by another user are not visible. "no such container" in a follow-up command usually means --rm already removed it.