Skip to content

Conversation

@limjh16
Copy link
Contributor

@limjh16 limjh16 commented Dec 2, 2025

Right now, upon docker stop, the container does not catch the SIGTERM and thus does not stop until after the timeout and a SIGKILL is issued.

This uses tini as an entrypoint, which fixes this issue

Fixes the container not stopping upon `SIGTERM`
@bokysan
Copy link
Owner

bokysan commented Dec 3, 2025

Hi, thank you so much for the commit. I have no issues adding tini - I'm familiar with it.

But could I kindly as you explain here, for reference, explicit use case you've been running into? I have had no issues and neither did anyone else complain until now.

@limjh16
Copy link
Contributor Author

limjh16 commented Dec 3, 2025

Maybe I am doing something wrong, but my tests, without tini the image does not stop upon docker container stop or docker compose down, and this works with tini. Not a huge problem, but just annoying for me when I am starting and stopping my compose project often 🥲

I guessed that the reason is because SIGTERM was not being caught by the script, but tini catches it and stops everything.

You can see this with the asciicast (at 17 seconds, that's the instant stop with tini, and at 53 seconds, that's the :latest image that does not stop immediately)

asciicast

@bokysan
Copy link
Owner

bokysan commented Dec 4, 2025

This is interesting. I have not run into these issues myself. We also have a lot of automated tests inside the project which spin containers up and down and they stop without any issues on GitHub's testing environment as well.

I will approve this commit, as I nothing wrong with using tini, but a bit more of testing will be needed before tagging the version.

Thank you for your effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants