0

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?

Keith Palmer Jr.
  • 1,173
  • 4
  • 16
  • 29
  • I would expect standard `docker stop` behaviour, sending `SIGTERM` followed by `SIGKILL` after a grace period (I think the default is 10 seconds). – AlexD Aug 04 '23 at 15:12

0 Answers0