From 5e98632115d868a396c80843a138fdf9c177504e Mon Sep 17 00:00:00 2001 From: DerRockWolf <50499906+DerRockWolf@users.noreply.github.com> Date: Sun, 2 Feb 2025 09:58:27 +0100 Subject: [PATCH] fix(docker/entrypoint.sh): Use `exec` to replace the shell 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`. --- docker/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index bafc159..70962fb 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -10,4 +10,4 @@ if [ -z "${SECRET_KEY}" ]; then fi fi -playit -s --secret "${SECRET_KEY}" --platform_docker start +exec playit -s --secret "${SECRET_KEY}" --platform_docker start