What type of signal is sent when the container is restarted due to an update?

The documentation says that SIGTERM is sent followed by SIGKILL 10 seconds later when using the restart action. I was wondering if these same signals are sent to the container when container updates are performed --reason being is that I would like to do some program cleanup prior to exiting the program completely.

Hello there, the same process you describe is performed when containers update: SIGTERM is sent followed by SIGKILL 10 seconds later. Trapping SIGTERM should do the trick for your cleanup.

1 Like