Exiting container when Standalone or Node exits #1504
Merged
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.
Thanks for contributing to the Docker-Selenium project!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines, applied for this repository.
Avoid large PRs, help reviewers by making them as simple and short as possible.
This will exit the NodeChrome/NodeFirefox/NodeEdge/StandaloneChrome/StandaloneFirefox/StandaloneEdge container(s) when the Selenium Server process exits.
Description
The behaviour we have always had is one where supervisor controls all processes and keeps the container running. This is great because it has improved maintainability and readability. However, when the most important process, the Selenium Server, exits... the container has no purpose anymore. Users need to stop/kill the container themselves.
This change will make the container exit when the Selenium Server process exits.
Motivation and Context
In some environments like Kubernetes, it is useful to know when the Selenium Server is not running anymore to stop the pod. This was not possible because the container was still running. Now, since the container exits, the pod can be removed as well.
Used the solution proposed here Supervisor/supervisor#712 (comment)
Fixes #1435
Types of changes
Checklist