Update recommended Dockerfile instructions to run as PID 1#151
Merged
SimonFrings merged 1 commit intoclue:mainfrom Apr 21, 2022
Merged
Update recommended Dockerfile instructions to run as PID 1#151SimonFrings merged 1 commit intoclue:mainfrom
Dockerfile instructions to run as PID 1#151SimonFrings merged 1 commit intoclue:mainfrom
Conversation
SimonFrings
approved these changes
Apr 21, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This simple changeset updates the recommended
Dockerfileinstructions to run X as PID 1 without an implicit wrapping shell. In particular, by avoiding an additionalshprocess, we can ensure any signals sent always target thephpprocess directly.Note that PID 1 has special semantics on Unix-based systems. In particular, it does not have any default signal handling (which is why this builds on top of #150 first) and has additional responsibilities to reap zombie child processes. Child processes spawned directly using the ChildProcess component should be reaped just fine, but orphaned processes from deeper process trees may require special care. If in doubt, using a small init process like
tiniordump-initinside your Docker container may be a good idea. In the long run, X should get additional features to handle theSIGCHLDsignal to take care of any orphaned processes itself, but this is currently out of scope for this PR and should be addressed in a follow-up PR in the future.Link dump for further details:
Builds on top of #136, #149 and #150