List Docker containers
docker
Updated August 29, 2026
List running containers with:
docker ps
Include stopped containers with docker ps --all. Useful columns include the name, status, ports, and image. For a compact custom view:
docker ps -a --format 'table {{.Names}}\t{{.Status}}\t{{.Image}}'
A container ID is enough for most commands, but a stable name is easier to read. Filter rather than parsing table output in scripts:
docker ps -q --filter 'status=running'
Compose services are best viewed with docker compose ps from the project directory. If the list is unexpectedly empty, check docker context show; the CLI may be connected to a different engine. docker ps lists containers, not images or volumes.
Sources
related.
Ruslan Osipov
About the author