问题原文
原帖链接 · saabeilin · CC BY-SA 3.0
We are running docker in swarm mode on a few nodes.
Could not find a quick and easy way to list all containers (preferably with status) in the swarm from the manager nodes. One can see overlay networks and locally-running containers attached to these networks, also services - but not the container details, etc.
Is it something already available or is using the REST API the only available option? (not sure if all required info is available there though)
已采纳解答
原帖链接 · agxs · CC BY-SA 3.0
You can do docker node ls to see all the nodes in your swarm, then docker node ps <node> to see the containers on that node.
As a one liner, you can do:
docker node ps $(docker node ls -q)
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
