@@ -84,19 +84,32 @@ class OracleDatabase implements TestableDatabase {
8484 }
8585 }
8686
87- public static final OracleContainer oracle = new OracleContainer ( imageName ( "gvenzl/oracle-xe" , "21-slim-faststart" ) )
87+ public static final OracleContainer oracle = new OracleContainer (
88+ imageName ( "gvenzl/oracle-free" , "23.2.0-faststart" )
89+ .asCompatibleSubstituteFor ( "gvenzl/oracle-xe" ) )
8890 .withUsername ( DatabaseConfiguration .USERNAME )
8991 .withPassword ( DatabaseConfiguration .PASSWORD )
9092 .withDatabaseName ( DatabaseConfiguration .DB_NAME )
91- .withLogConsumer ( of -> System . out . println ( of .getUtf8String () ) )
93+ .withLogConsumer ( of -> logContainerOutput ( of .getUtf8String () ) )
9294 .withReuse ( true )
95+ .withStartupAttempts ( 1 )
9396
9497 // We need to limit the maximum amount of CPUs being used by the container;
9598 // otherwise the hardcoded memory configuration of the DB might not be enough to successfully boot it.
9699 // See https://github.com/gvenzl/oci-oracle-xe/issues/64
97100 // I choose to limit it to "2 cpus": should be more than enough for any local testing needs,
98101 // and keeps things simple.
99102 .withCreateContainerCmdModifier ( cmd -> cmd .getHostConfig ().withCpuCount ( 2L ) );
103+ ;
104+
105+ private static void logContainerOutput (String line ) {
106+ System .out .print ( line );
107+ }
108+
109+ //Start the container only - useful for testing and CLI
110+ public static void main (String [] args ) {
111+ oracle .start ();
112+ }
100113
101114 @ Override
102115 public String getJdbcUrl () {
0 commit comments