From d061a0374965986ec0b56b4e2c3ec7c011937bdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edd=C3=BA=20Mel=C3=A9ndez=20Gonzales?= Date: Thu, 25 Jul 2024 00:54:59 -0600 Subject: [PATCH] Do not override LocalStack command (#8991) --- .../containers/localstack/LocalStackContainer.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/localstack/src/main/java/org/testcontainers/containers/localstack/LocalStackContainer.java b/modules/localstack/src/main/java/org/testcontainers/containers/localstack/LocalStackContainer.java index e63ee24cff7..b9a88e96102 100644 --- a/modules/localstack/src/main/java/org/testcontainers/containers/localstack/LocalStackContainer.java +++ b/modules/localstack/src/main/java/org/testcontainers/containers/localstack/LocalStackContainer.java @@ -123,8 +123,13 @@ public LocalStackContainer(final DockerImageName dockerImageName, boolean useLeg withFileSystemBind(DockerClientFactory.instance().getRemoteDockerUnixSocketPath(), "/var/run/docker.sock"); waitingFor(Wait.forLogMessage(".*Ready\\.\n", 1)); - withCreateContainerCmdModifier(cmd -> cmd.withEntrypoint("sh")); - setCommand("-c", "while [ ! -f " + STARTER_SCRIPT + " ]; do sleep 0.1; done; " + STARTER_SCRIPT); + withCreateContainerCmdModifier(cmd -> { + cmd.withEntrypoint( + "sh", + "-c", + "while [ ! -f " + STARTER_SCRIPT + " ]; do sleep 0.1; done; " + STARTER_SCRIPT + ); + }); } private static boolean isVersion2(String version) {