Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OBS-361: Remove tini from all Docker containers. #3049

Merged
merged 1 commit into from
Oct 28, 2024
Merged

Conversation

smarnach
Copy link
Contributor

@smarnach smarnach commented Oct 28, 2024

The tini process was originally added to make Docker comtainers quite properly when receiving the TERM signal on docker compose stop. Some containers don't react to this signal, so terminating them will hang for ten seconds before Docker Compose sends SIGKILL.

This change removes tini evertywhere while ensuring container shutdown still happens on the first signal. for some containers, I added the correct signal in docker-compose.yml using the stop_signal directive. For the frontend containers I made sure the shell script uses exec to start the actual main process, so there shell doesn't linger in the background to block signals. For the oidc-provider, I filed a PR with a similar change.

https://mozilla-hub.atlassian.net/browse/OBS-361

@smarnach smarnach requested a review from a team as a code owner October 28, 2024 12:33
@@ -196,6 +196,7 @@ services:
ports:
- "${EXPOSE_SENTRY_PORT:-8090}:8090"
command: run --host 0.0.0.0 --port 8090
stop_signal: SIGINT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove tini from the fakesentry container in docker/images/fakesentry/Dockerfile.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you did that already. I'm surprised it needs this, then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why it needs this, but I tested that it does.

@smarnach smarnach added this pull request to the merge queue Oct 28, 2024
Merged via the queue into main with commit 98ac154 Oct 28, 2024
2 checks passed
@smarnach smarnach deleted the remove-tini branch October 28, 2024 20:49
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.

3 participants