watchtower
watchtower copied to clipboard
fix: gracefully stop containers (#237)
- updated docker to v23.0.1+incompatible closes #237
Is there anything holding this back?
It has conflicts, but I think the main problem is that I have no idea what this PR is trying to do. It just looks like it would do a worse job at gracefully stopping containers.
Why would it be worse? ContainerStop
does graceful termination, falling back to SIGKILL: https://github.com/moby/moby/blob/d2e7a6e799c98815f0b163d16ee14f8359700c39/daemon/stop.go#L23. Admittedly, I'm not sure what the difference between ContainerStop
and ContainerKill
is if you specify a signal, but I guess it's similar to docker stop
vs docker kill
where the former seems to be the recommended option for graceful termination.
It's worse because it doesn't use the container-specified signal, sends a kill signal if it doesn't respond, but doesn't wait for the container to stop.
The removal of the container that is done after the stopping (with force
which kills the container if it's running) should result in the same behaviour as the container stop. Hence why I don't think this solves anything (and it's hard to actually test).
I'm getting notifications on my Synology box about this. I'm curious if there's an ETA for this PR landing.
I've been waiting for this fix ever since I bought my NAS but have only now got annoyed enough with the notifications to look. Other than the potential risk of a 3 major release jump in the docker CLI.. I see no risk in the changes.
What is this PR waiting for? Is there something that can be done to help it get merged?
I am also interested in helping move this forward.
I just started using Watchtower and would love this to avoid the erroneous messages from Synology about unexpected container stops.