Skip to content

Docker Swarm Snippets and Musings ​

Updating Services ​

View services:

bash
docker service ls

To scale a service up or down:

bash
docker service scale <service_name>=<number_of_replicas>

Sometimes services get stuck or need to be forcefully updated:

bash
docker service update --force <service_name>

To check placement and/or task history:

bash
docker service ps <service_name> --no-trunc

TIP

Sometimes if you need to force containers to restart use the update force (e.g. after restarting a node).