CompTIA
XK0-005 · Question #856
A Linux administrator wants to display a list of all containers, including ones that are stopped. Which of the following commands should the administrator run?
The correct answer is A. docker ps -a. The -a flag tells Docker to list all containers-running, stopped, or exited-whereas docker ps by itself only shows running ones.
Scripting, Containers, and Automation
Question
A Linux administrator wants to display a list of all containers, including ones that are stopped. Which of the following commands should the administrator run?
Options
- Adocker ps -a
- Bdocker image list
- Cdocker stats
- Ddocker list -a
How the community answered
(24 responses)- A92% (22)
- C4% (1)
- D4% (1)
Explanation
The -a flag tells Docker to list all containers-running, stopped, or exited-whereas docker ps by itself only shows running ones.
Topics
#Docker#Container management#docker ps command
Community Discussion
No community discussion yet for this question.