CompTIACompTIA
XK0-005 · Question #1851
XK0-005 Question #1851: Real Exam Question with Answer & Explanation
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
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 line
Community Discussion
No community discussion yet for this question.