Skip to content

Commit f041394

Browse files
eddumelendezfokion
authored andcommitted
Do not override LocalStack command (testcontainers#8991)
1 parent ee5e737 commit f041394

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

modules/localstack/src/main/java/org/testcontainers/containers/localstack/LocalStackContainer.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,13 @@ public LocalStackContainer(final DockerImageName dockerImageName, boolean useLeg
123123

124124
withFileSystemBind(DockerClientFactory.instance().getRemoteDockerUnixSocketPath(), "/var/run/docker.sock");
125125
waitingFor(Wait.forLogMessage(".*Ready\\.\n", 1));
126-
withCreateContainerCmdModifier(cmd -> cmd.withEntrypoint("sh"));
127-
setCommand("-c", "while [ ! -f " + STARTER_SCRIPT + " ]; do sleep 0.1; done; " + STARTER_SCRIPT);
126+
withCreateContainerCmdModifier(cmd -> {
127+
cmd.withEntrypoint(
128+
"sh",
129+
"-c",
130+
"while [ ! -f " + STARTER_SCRIPT + " ]; do sleep 0.1; done; " + STARTER_SCRIPT
131+
);
132+
});
128133
}
129134

130135
private static boolean isVersion2(String version) {

0 commit comments

Comments
 (0)