Overview - Listing containers (docker ps, docker ps -a)
What is it?
Listing containers means showing which Docker containers are currently on your system. The command 'docker ps' shows only running containers, while 'docker ps -a' shows all containers, including those stopped. This helps you see what containers exist and their status at a glance.
Why it matters
Without being able to list containers, you wouldn't know which containers are running or stopped, making it hard to manage or troubleshoot your Docker environment. It’s like trying to find a parked car without a parking lot map. This command helps you keep track of your containers easily.
Where it fits
Before learning this, you should understand what Docker containers are and how to start or stop them. After this, you can learn how to inspect container details, manage container logs, or remove containers.