diff --git a/extensions/devservices/oracle/src/main/java/io/quarkus/devservices/oracle/deployment/OracleDevServicesProcessor.java b/extensions/devservices/oracle/src/main/java/io/quarkus/devservices/oracle/deployment/OracleDevServicesProcessor.java index 3062fe714ba1e..80889956024fd 100644 --- a/extensions/devservices/oracle/src/main/java/io/quarkus/devservices/oracle/deployment/OracleDevServicesProcessor.java +++ b/extensions/devservices/oracle/src/main/java/io/quarkus/devservices/oracle/deployment/OracleDevServicesProcessor.java @@ -45,6 +45,14 @@ public RunningDevServicesDatasource startDatabase(Optional username, Opt container.withUsername(username.orElse(DEFAULT_DATABASE_USER)) .withPassword(password.orElse(DEFAULT_DATABASE_PASSWORD)) .withDatabaseName(datasourceName.orElse(DEFAULT_DATABASE_NAME)); + + // We need to limit the maximum amount of CPUs being used by the container; + // otherwise the hardcoded memory configuration of the DB might not be enough to successfully boot it. + // See https://github.com/gvenzl/oci-oracle-xe/issues/64 + // I choose to limit it to "2 cpus": should be more than enough for any local testing needs, + // and keeps things simple. + container.withCreateContainerCmdModifier(cmd -> cmd.getHostConfig().withNanoCPUs(2_000_000_000l)); + additionalJdbcUrlProperties.forEach(container::withUrlParam); container.start();