Bootstrap FreeKB - Docker - List services using the docker service ls command
Docker - List services using the docker service ls command

Updated:   |  Docker articles

The docker service ls command can be used to list services.

docker service ls

 

Something like this should be returned.

ID            NAME         MODE        REPLICAS  IMAGE                                  PORTS
jwwpwkpzkqe0  foo-service  replicated  1/1       server1.example.com/foo:latest         *:8101->8080/tcp
rof5uwjm749q  bar-service  replicated  1/1       server1.example.com/bar:latest         *:8155->8104/tcp
v771iegeoxrm  service003   replicated  1/1       server1.example.com/helloworld:latest  *:8123->8000/tcp

 

The --filter option can be used to filter the output to match the ID, name, or image of a service.

sudo docker service ls --filter name=foo-service

 




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 9237e3 in the box below so that we can be sure you are a human.