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

Add support for killing a container #716

Closed
cristianrgreco opened this issue Feb 18, 2024 · 1 comment
Closed

Add support for killing a container #716

cristianrgreco opened this issue Feb 18, 2024 · 1 comment
Labels
triage Investigation required

Comments

@cristianrgreco
Copy link
Collaborator

Calling container.stop() asks the container to stop, and will block for a given timeout (which by default is 0). If a container takes a long time to stop, or ignores a SIGTERM, then it will continue to run, even after being asked to stop.

We cannot make container.stop() also kill the container, because some containers need to be interacted with after it's been stopped (e.g a Selenium container to copy the recordings from).

Therefore we could add a separate kill method to the StartedTestContainer which users can call in cases where the container does not gracefully stop.

@cristianrgreco cristianrgreco added the enhancement New feature or request label Feb 18, 2024
@cristianrgreco
Copy link
Collaborator Author

Looking into this a bit more, Docker should automatically kill the container when the stop timeout elapses, meaning this is unnecessary. Found this issue which implies a potential regression with Docker on Ubuntu redis/docker-library-redis#386. Need more info to reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Investigation required
Projects
None yet
Development

No branches or pull requests

1 participant