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

fix(docker/entrypoint.sh): Use exec to replace the shell #109

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

DerRockWolf
Copy link
Contributor

This should be done to allow the container to properly react to unix signals (e.g., SIGTERM).

Currently, PID 1 is sh which is executing the script until the playit binary stops. When the pod is stopped, e.g., using docker stop or in Kubernetes, when the pod is being deleted, the container runtime sends a SIGTERM to PID 1 to allow for graceful termination. sh however, does not handle signals, which results in the container running indefinitely until the container runtime sends a SIGKILL.

This should be done to allow the container to properly react to unix signals (e.g., `SIGTERM`).

Currently, PID 1 is `sh` which is executing the script until the `playit` binary stops.
When the pod is stopped, e.g., using `docker stop` or in Kubernetes, when the pod is being deleted, the container runtime sends a `SIGTERM` to PID 1 to allow for graceful termination. `sh` however, does not handle signals, which results in the container running indefinitely until the container runtime sends a `SIGKILL`.
@loriopatrick
Copy link
Contributor

Thank you, I'll get this into the next release.

@loriopatrick loriopatrick merged commit afba4ca into playit-cloud:master Feb 5, 2025
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