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

Feature Request: write container id to .tmp file #634

Closed
slavniyteo opened this issue Apr 4, 2018 · 2 comments
Closed

Feature Request: write container id to .tmp file #634

slavniyteo opened this issue Apr 4, 2018 · 2 comments

Comments

@slavniyteo
Copy link

Hi, thank you for awesom development tool.

We use testcontainers in spring-based microservices mostly for launching PostgresQL database. It is enough to use jdbc-url based configuration for us. Also usually we run containers in daemon mode.

Sometimes when I run tests on my machine and then interrupt them (with Ctrl+C, for example), launched container doesn't stop. This is expected because process didn't stop gracefully.

But while it is ok on local machine, it becomes a trouble on CI agents. I noticed many zombie postgres containers on CI agent machines. Probably it hapens because of OutOfMemory on agents (it happens seldom, but it does), probably because of #253 (see the last comment) or something else.

Anyway it seems useful to store launched containers to have an ability to stop them automatically in exceptional cases.

@bsideup
Copy link
Member

bsideup commented Apr 4, 2018

Hi @slavniyteo,

Did you try version 1.6.0? There is a new feature called "Death note" ( See #545 ) for that. Even if you kill -9 your process, the containers will get cleaned.

FYI there is also org.testcontainers=true label on containers started with Testcontainers

@slavniyteo
Copy link
Author

Wow, DeathNote works nice, thank you for a quick answer.

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

No branches or pull requests

2 participants