Skip to content

Commit

Permalink
fix(docker/entrypoint.sh): Use exec to replace the shell (#109)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
DerRockWolf authored Feb 5, 2025
1 parent 87d6cd4 commit afba4ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit afba4ca

Please sign in to comment.