The command docker inspect nodes will not list all nodes in a swarm cluster from the command line. This is because docker inspect requires one or more names or IDs of the objects to inspect1. To list all nodes in a swarm cluster, you need to use the command docker node ls2, which will display information such as node ID, hostname, status, availability, and role3. References:
docker inspect | Docker Docs
docker node ls | Docker Docs
How to list nodes in a Docker swarm cluster
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit