I keep getting the following error Docker container borg-server stopped unexpectedly around the time watchtower is scheduled. I have looked into and the only thing I think that has happened is that the container isnt responding to SIGTERM signals causing watchtower, after sometime, to force it via SIGKILL.
I read that this can be caused if the processes of the container are called under bash -c because the SIGTERM signals are not passed on to processes.
Apparently
ENTRYPOINT /run.sh
wraps/run.sh in bash -c
Hello,
I keep getting the following error
Docker container borg-server stopped unexpectedly
around the timewatchtower
is scheduled. I have looked into and the only thing I think that has happened is that the container isnt responding to SIGTERM signals causing watchtower, after sometime, to force it via SIGKILL.I read that this can be caused if the processes of the container are called under
bash -c
because the SIGTERM signals are not passed on to processes.Apparently
ENTRYPOINT /run.sh
wraps/run.sh
inbash -c
and
ENTRYPOINT [“/run.sh”]
doesn’t as officially explainedYou can also propagate SIGTERM signals to bash child processes using bash’s trap and wait
Lastly, not all docker containers or applications use SIGTERM here you can use dockerfile's
STOPSIGNAL
to change the signal typeI think its probably the first two issues.