Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

465
Views
How to stop a deployed docker stack?

I just completed the beginners Docker tutorials and would like to know how to clean up.

I deployed a stack and with a few different service using the below command:

docker stack deploy --compose-file docker-stack.yml vote 

Is there away to stop all the containers associated with this stack, or do I have to stop them individually?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

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
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!