Replies: 1 comment
-
|
This is by design! Here's why: Ryuk (ResourceReaper) is the cleanup safety net. Its job is to ensure that Docker resources (containers, networks, volumes) created by Testcontainers are cleaned up even if your JVM crashes or tests are killed. When you call labels.putAll(ResourceReaper.instance().getLabels());Calling Why not defer Ryuk until a container starts? If you want to avoid early Ryuk startup:
The overhead of Ryuk starting early is minimal (~1-2s, ~12MB RAM). It's a small price for guaranteed cleanup. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m seeing
testcontainers/ryukstart as soon as I create a custom network, even when launching a single container. InCreateNetworkCmdsetup, Testcontainers callsResourceReaper.instance().getLabels()toadd cleanup labels:
This call appears to initialize ResourceReaper, which starts Ryuk even when reuse is enabled. Is this expected? Is there a way to avoid starting Ryuk when creating a network (without globally disabling Ryuk or relying on reuse)?
Beta Was this translation helpful? Give feedback.
All reactions