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

testcontainer not reusing container if stopped #783

Closed
ibnumusyaffa opened this issue Jun 22, 2024 · 2 comments · Fixed by #849
Closed

testcontainer not reusing container if stopped #783

ibnumusyaffa opened this issue Jun 22, 2024 · 2 comments · Fixed by #849
Labels
enhancement New feature or request

Comments

@ibnumusyaffa
Copy link

ibnumusyaffa commented Jun 22, 2024

Hi, thanks for the great libraries.
Why does Testcontainers not reuse containers if they are stopped? Is this a bug or some limitation? My expectation is that Testcontainers just start existing stopped containers instead of creating new ones

Thank you

@cristianrgreco
Copy link
Collaborator

Hello! It is a good point. The use case just hasn't come up until now 🙂 The implementation currently only looks for running containers. It would be easy enough to remove this filter and if the container is stopped, start it. PR is welcome!

@cbrevik
Copy link
Contributor

cbrevik commented Oct 24, 2024

I've taken a stab at this in #849. Had some issues with bound ports, but think I found an okay solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants