nerdexam
CompTIA

XK0-005 · Question #637

An administrator would like to list all current containers, regardless of their running state. Which of the following commands would allow the administrator to accomplish this task?

The correct answer is A. docker ps -a. The best command to use to list all current containers, regardless of their running state, is A) docker ps -a. This command will show all containers, both running and stopped, with details such as container ID, image name, status, and ports. The other commands are either…

Scripting, Containers, and Automation

Question

An administrator would like to list all current containers, regardless of their running state. Which of the following commands would allow the administrator to accomplish this task?

Options

  • Adocker ps -a
  • Bdocker list
  • Cdocker image ls
  • Ddocker inspect image

How the community answered

(23 responses)
  • A
    91% (21)
  • B
    4% (1)
  • C
    4% (1)

Explanation

The best command to use to list all current containers, regardless of their running state, is A) docker ps -a. This command will show all containers, both running and stopped, with details such as container ID, image name, status, and ports. The other commands are either invalid or not relevant for this task.

Topics

#Docker#Containers#Container management#CLI

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice