Skip to content

Commit a3f672c

Browse files
committed
test: update tt3 config
1 parent 65bdd5c commit a3f672c

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

testcontainers/src/main/java/org/testcontainers/containers/tarantool/Tarantool3Container.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,23 @@ protected void configure() {
227227
withEnv("TT_CONFIG_ETCD_ENDPOINTS", joinEtcdAddresses(this.etcdAddresses));
228228
withEnv("TT_CONFIG_ETCD_PREFIX", this.etcdPrefix);
229229
}
230-
withCreateContainerCmdModifier(cmd -> cmd.withName(this.node).withUser("root"));
231230
withPrivilegedMode(true);
231+
withCreateContainerCmdModifier(
232+
cmd -> {
233+
cmd.withName(this.node).withUser("root");
234+
// Get original entrypoint, default to tarantool if not set
235+
String originalEntrypoint = "tarantool";
236+
if (cmd.getEntrypoint() != null && cmd.getEntrypoint().length > 0) {
237+
originalEntrypoint = String.join(" ", cmd.getEntrypoint());
238+
}
239+
// Override entrypoint to fix permissions first, then exec original
240+
cmd.withEntrypoint(
241+
"sh",
242+
"-c",
243+
String.format(
244+
"chmod -R 777 %s 2>/dev/null || true && exec %s",
245+
TarantoolContainer.DEFAULT_DATA_DIR.toAbsolutePath(), originalEntrypoint));
246+
});
232247
this.configured = true;
233248
} catch (Exception e) {
234249
throw new ContainerLaunchException(e.getMessage(), e);

0 commit comments

Comments
 (0)