From f8d1c7f153ff58b649d24fa09bb0ab5cc5f8b5e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez?= Date: Wed, 30 Oct 2024 11:08:29 -0600 Subject: [PATCH] Revert "Add shutdownHook to send sigterm to ryuk (#7717)" This reverts commit 39f02190c01702fb3121b080f29c72bbdf7c78ea. Fixes #8558 --- .../testcontainers/utility/RyukResourceReaper.java | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/core/src/main/java/org/testcontainers/utility/RyukResourceReaper.java b/core/src/main/java/org/testcontainers/utility/RyukResourceReaper.java index 7e1b7802fb0..999b1cbbffb 100644 --- a/core/src/main/java/org/testcontainers/utility/RyukResourceReaper.java +++ b/core/src/main/java/org/testcontainers/utility/RyukResourceReaper.java @@ -77,19 +77,6 @@ private synchronized void maybeStart() { ryukContainer.start(); - Runtime - .getRuntime() - .addShutdownHook( - new Thread( - DockerClientFactory.TESTCONTAINERS_THREAD_GROUP, - () -> { - this.dockerClient.killContainerCmd(this.ryukContainer.getContainerId()) - .withSignal("SIGTERM") - .exec(); - } - ) - ); - CountDownLatch ryukScheduledLatch = new CountDownLatch(1); String host = ryukContainer.getHost();