File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
testcontainers/src/main/java/org/testcontainers/containers/tarantool Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff 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 );
You can’t perform that action at this time.
0 commit comments