Introduction
Sometimes you want to see which containers are running or have run on your computer. The commands docker ps and docker ps -a help you list these containers so you know their status and details.
When you want to check which containers are currently running on your machine.
When you want to see all containers, including those that have stopped or exited.
When you need to find the container ID or name to stop or remove a container.
When you want to verify if a container started correctly after running a docker run command.
When you want to monitor container uptime and status during development or troubleshooting.