Replies: 10 comments 1 reply
-
|
Speaking of the API, Docker's API supports grace period to be supplied in the query but I wasn't able to find a way to specify a signal to send to the container, although it's possible to predefine desired stop signal when creating a container. |
Beta Was this translation helpful? Give feedback.
-
|
Another option will be to handle stopping of the container by ourselves because it's possible to pass a signal through ContainerKill call but it obviously doesn't support any kind of delay. |
Beta Was this translation helpful? Give feedback.
-
|
You have two things : At container creation, you can specify : This is store in container config like other runtime options At container stop action, you can ovveride the default timeout to wait before killing it |
Beta Was this translation helpful? Give feedback.
-
|
And you have equivalent behavior for services, tho this issue is about swarm mode services :D |
Beta Was this translation helpful? Give feedback.
-
|
@WTFKr0, yeah but we're not able to define stop signal dynamically and preserve timeout at the same time |
Beta Was this translation helpful? Give feedback.
-
|
I'm working on a PR for this but curious where in the UI others thing this should exist. I feel like in the update config of services perhaps? (For service context). What about container config? Here's what I have right now, not sure if this makes the most sense or not for services page: |
Beta Was this translation helpful? Give feedback.
-
|
It would be nice if this could be specified during container creation so that the delay and signal are respected from the UI [Stop] button. Sometimes I don't wish to do an automatic update and just wish to stop my container so I can inspect it's files without it running, however I need it to exit gracefully so that files are flushed. |
Beta Was this translation helpful? Give feedback.
-
|
Oh hey its me there from the past. @jamesmr89 Did you ever get anywhere with the PR you were preparing? |
Beta Was this translation helpful? Give feedback.
-
|
Is there any news with this? |
Beta Was this translation helpful? Give feedback.
-
|
No ETA on this, we'd accept a contribution. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
It would be desirable to have these options configurable.
--stop-grace-period | | Time to wait before force killing a container (ns|us|ms|s|m|h)
--stop-signal | | API 1.28+ Signal to stop the container
https://docs.docker.com/edge/engine/reference/commandline/service_update/
Beta Was this translation helpful? Give feedback.
All reactions