How to stop a deployed docker stack?

You can remove a stack with:

docker stack rm vote

At present, this is still a detached operation that will take time to run in the background.


If for some reason you still want the stack and service definitions, you can scale the “replicated” services down to 0 replicas, and “global” services you can add a constraint that doesn’t match any node.

docker service update --replicas 0 $service_name
docker service update --constraint-add node.labels.no_such_node=true $service_name

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)