Docker - List services using the docker service ls command
by
Jeremy Canfield |
Updated: February 12 2022
| 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