DCA · Question #128
Will this command list all nodes in a swarm cluster from the command line? Solution: 'docker swarm nodes'
The correct answer is B. No. The command docker swarm nodes is not a valid Docker CLI command to list nodes in a Swarm cluster.
Question
Will this command list all nodes in a swarm cluster from the command line? Solution: 'docker swarm nodes'
Options
- AYes
- BNo
How the community answered
(34 responses)- A9% (3)
- B91% (31)
Why each option
The command `docker swarm nodes` is not a valid Docker CLI command to list nodes in a Swarm cluster.
There is no `docker swarm nodes` command; using this would result in a command not found error from the Docker CLI.
The command `docker swarm nodes` is syntactically incorrect; the correct subcommand for managing and listing Swarm nodes is `node`, as in `docker node ls`.
Concept tested: Docker Swarm node listing command syntax
Source: https://docs.docker.com/engine/reference/commandline/node_ls/
Topics
Community Discussion
No community discussion yet for this question.