Bootstrap FreeKB - Docker - List services in a stack using the docker stack services ls command
Docker - List services in a stack using the docker stack services ls command

Updated:   |  Docker articles

The docker stack ls command can be used to display the stacks. This command must be run from the swarm manager.

docker stack ls

 

Something like this should be returned.

NAME  SERVICES  ORCHESTRATOR
foo   3         Swarm
bar   1         Swarm

 

The docker stack services <stack name> command can be used to display the services in a stack.

docker stack services foo

 

Something like this should be returned.

ID                  NAME                   MODE                REPLICAS            IMAGE                                                              PORTS
ivq9h5yxl1om        foo_service001         replicated          1/1                 registry.example.com/foo_service001:latest   
kod8l0fc9alv        foo_service002         replicated          1/1                 registry.example.com/foo_service001:latest               *:8000->8000/tcp
l4frotyxwqzg        foo_service003         replicated          0/1                 

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 03a70c in the box below so that we can be sure you are a human.