Docker Compose Cheat Sheet/List project containers

Shows containers and status for the project.

Section: Logs, Exec, and Shell Access

List project containers

bash
bash
docker compose ps
Explanation

Use `-a` to include stopped containers.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Logs, Exec, and Shell Access
Show logs
Prints aggregated logs for the project.
OpenIn sheetbashsame section
Follow logs
Streams live logs from services.
OpenIn sheetbashsame section
Tail logs for one service
Shows only recent log lines for a service.
OpenIn sheetbashsame section
Open shell in running service
Executes a shell inside an already-running service container.
OpenIn sheetbashsame section
Open bash in running service
Runs Bash inside the running service container.
OpenIn sheetbashsame section
Run one-off command
Starts a fresh container for a one-off task and removes it after exit.
OpenIn sheetbashsame section