nerdexam
Docker

DCA · Question #130

Will this command list all nodes in a swarm cluster from the command line? Solution: `docker Is -a'

The correct answer is A. Yes. Assuming 'Is' is a typo for 'ls' and implicitly referring to docker node ls, this command would list all nodes in a Docker Swarm cluster.

Submitted by certguy· Apr 18, 2026Container Orchestration

Question

Will this command list all nodes in a swarm cluster from the command line? Solution: `docker Is -a'

Options

  • AYes
  • BNo

How the community answered

(21 responses)
  • A
    86% (18)
  • B
    14% (3)

Why each option

Assuming 'Is' is a typo for 'ls' and implicitly referring to `docker node ls`, this command would list all nodes in a Docker Swarm cluster.

AYesCorrect

If 'Is' is interpreted as a typo for `ls`, and `docker ls` is understood to implicitly refer to `docker node ls` in the context of listing Swarm entities, then `docker node ls` successfully lists all nodes in a Docker Swarm, making the statement true under this interpretation. The `-a` flag is not typically used with `docker node ls` but doesn't prevent it from listing all nodes.

BNo

Concept tested: Docker Swarm node listing command (with typo interpretation)

Source: https://docs.docker.com/engine/reference/commandline/node_ls/

Topics

#Docker Swarm#Swarm Node Management#CLI

Community Discussion

No community discussion yet for this question.

Full DCA Practice