Docker CLI
docker ps
List running containers by default. Use -a to include all container objects, including created and exited containers.
Formal Syntax & Structure
docker syntaxdocker
docker ps [OPTIONS]Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| -a | flag | Include all container objects, including created and exited containers. |
Return Value
CLI output
Container listing.
Working Example
Example Snippetdocker
docker ps -a