Recall & Review
beginner
What does the command
docker ps do?It lists all running Docker containers on your system, showing details like container ID, image, status, and ports.
Click to reveal answer
beginner
What extra information does
docker ps -a show compared to docker ps?docker ps -a lists all containers, including those that are stopped, exited, or paused, not just the running ones.Click to reveal answer
beginner
How can you see the status of a container using Docker commands?
Use
docker ps or docker ps -a. The status column shows if a container is running, exited, or paused.Click to reveal answer
intermediate
Why might you want to use
docker ps -a instead of just docker ps?To see all containers including those that have stopped or exited, which helps in troubleshooting or cleaning up unused containers.
Click to reveal answer
beginner
What information is typically shown in the output of
docker ps?Container ID, image name, command run, creation time, status, ports, and container name.
Click to reveal answer
Which command lists only running Docker containers?
✗ Incorrect
docker ps shows only running containers. docker ps -a shows all containers.
What does the
-a option do in docker ps -a?✗ Incorrect
The -a option lists all containers, not just running ones.
If you want to check why a container stopped, which command helps you see its status?
✗ Incorrect
docker ps -a shows the status of all containers including stopped ones.
Which column in
docker ps output tells you the container's current state?✗ Incorrect
The STATUS column shows if a container is running, exited, or paused.
What command would you use to see all containers including those that exited hours ago?
✗ Incorrect
docker ps -a lists all containers regardless of their state.
Explain the difference between
docker ps and docker ps -a.Think about when you want to see containers that are not running.
You got /3 concepts.
Describe what information you get from the output of
docker ps.Look at the columns shown when you run the command.
You got /7 concepts.