Skip to content
Latchkey

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

Terminal
podman ps
podman ps -a
podman ps --filter "name=db" --format '{{.Names}} {{.Status}}'
podman ps -a --filter "status=exited" --format '{{.Names}} {{.ExitCode}}'

Options

FlagWhat it does
-a, --allShow all containers, not just running
-q, --quietPrint only container IDs
--filter <f>Filter, e.g. name=, status=, label=
--format <tmpl>Go template, e.g. {{.Names}} {{.Status}}
--no-truncDo not truncate output (full IDs/commands)
-l, --latestShow 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.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →