Skip to content

Commit ced5b72

Browse files
Use /tmp for startup scripts (#7524)
Fixes #8637 --------- Co-authored-by: Eddú Meléndez Gonzales <[email protected]>
1 parent 83d37bc commit ced5b72

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

modules/kafka/src/main/java/org/testcontainers/containers/KafkaContainer.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class KafkaContainer extends GenericContainer<KafkaContainer> {
3939

4040
private static final String DEFAULT_INTERNAL_TOPIC_RF = "1";
4141

42-
private static final String STARTER_SCRIPT = "/testcontainers_start.sh";
42+
private static final String STARTER_SCRIPT = "/tmp/testcontainers_start.sh";
4343

4444
// https://docs.confluent.io/platform/7.0.0/release-notes/index.html#ak-raft-kraft
4545
private static final String MIN_KRAFT_TAG = "7.0.0";
@@ -208,10 +208,10 @@ protected String commandKraft() {
208208
}
209209

210210
protected String commandZookeeper() {
211-
String command = "echo 'clientPort=" + ZOOKEEPER_PORT + "' > zookeeper.properties\n";
212-
command += "echo 'dataDir=/var/lib/zookeeper/data' >> zookeeper.properties\n";
213-
command += "echo 'dataLogDir=/var/lib/zookeeper/log' >> zookeeper.properties\n";
214-
command += "zookeeper-server-start zookeeper.properties &\n";
211+
String command = "echo 'clientPort=" + ZOOKEEPER_PORT + "' > /tmp/zookeeper.properties\n";
212+
command += "echo 'dataDir=/var/lib/zookeeper/data' >> /tmp/zookeeper.properties\n";
213+
command += "echo 'dataLogDir=/var/lib/zookeeper/log' >> /tmp/zookeeper.properties\n";
214+
command += "zookeeper-server-start /tmp/zookeeper.properties &\n";
215215
return command;
216216
}
217217

modules/kafka/src/main/java/org/testcontainers/kafka/KafkaContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public class KafkaContainer extends GenericContainer<KafkaContainer> {
2424

2525
private static final String DEFAULT_INTERNAL_TOPIC_RF = "1";
2626

27-
private static final String STARTER_SCRIPT = "/testcontainers_start.sh";
27+
private static final String STARTER_SCRIPT = "/tmp/testcontainers_start.sh";
2828

2929
private static final String DEFAULT_CLUSTER_ID = "4L6g3nShT-eMCtK--X86sw";
3030

0 commit comments

Comments
 (0)