testcontainers-node
testcontainers-node copied to clipboard
testcontainer not reusing container if stopped
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
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!
I've taken a stab at this in #849. Had some issues with bound ports, but think I found an okay solution