Score:0

What happens, and how quickly, to the old container when I do a docker stack deploy --prune

ca flag

We're doing deployments with docker swarm deploy --prune ... and having great success for the most part, but I have questions that I can't find answers to around what exactly --prune does.

I know it removes the old services, but I have questions about:

  • when does it remove the old services?
  • how does it remove the old services?

So for example, say Apache is running in the old container, and we do a docker stack deploy --prune ....

Does Apache just get kill -KILLd? Does it run apachectl stop?

When does that happen? At some specific # of minutes after the deploy, or...?

If I have a long-running HTTP request (e.g. say it's a download being streamed to a user, and it's 100gb, and takes 15 minutes to stream), does pruning the image just forcibly stop Apache and kill that download? Or will it wait until the download finishes, and exit cleanly?

jp flag
I would expect standard `docker stop` behaviour, sending `SIGTERM` followed by `SIGKILL` after a grace period (I think the default is 10 seconds).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.