Closed jens-ylja closed 1 year ago
We registered the exact same handler for both SIGINT
and SIGTERM
, so yes, if Docker uses SIGTERM
by default, then STOPSIGNAL SIGINT
is not needed.
We registered the exact same handler for both
SIGINT
andSIGTERM
, so yes, if Docker usesSIGTERM
by default, thenSTOPSIGNAL SIGINT
is not needed.
OK, I'll update the PR on Monday - my todays working session is over.
When using the Docker image to run ticktock I noticed
docker stop
to both take a long time and not cleanly terminating the ticktock executable. To verify the erroneous behaviour, please:docker run
the origin Docker image with a mounted volume to have the logs outside the containertail -f
the logfiledocker stop
the containerdocker stop
will hang for a while[INFO] [main] Shutdown process complete
logWhen drilling down this, the reason/solution was simple -> ticktock has to be run with
exec
inentrypoint.sh
. For further explanation please see e.g. https://madflojo.medium.com/shutdown-signals-with-docker-entry-point-scripts-5e560f4e2d45.This PR contains the according fix. To verify the fixed behaviour, please re-execute the procedure described above - you should now see the
[INFO] [main] Shutdown process complete
log message.Note: The
Dockerfile
contains aSTOPSIGNAL SIGINT
statement which isn't really neded (for my opinion). Docker usesSIGTERM
by default which in my tests seemed to work the same way.