diff --git a/project/Module.scala b/project/Module.scala index 050d6710d8..aae86bb618 100644 --- a/project/Module.scala +++ b/project/Module.scala @@ -128,25 +128,20 @@ trait Module { "--add-opens=java.desktop/java.awt=ALL-UNNAMED" ) - def dockerSettings(extraJavaOpts: String*): Seq[Def.Setting[_]] = { + def dockerSettings(): Seq[Def.Setting[_]] = { Seq( docker := (docker dependsOn assembly).value, docker / dockerfile := { val artifact = (assembly / assemblyOutputPath).value val artifactTargetPath = s"/app/${artifact.name}" - val entry = Seq( - "java", - "-Dorg.scalatra.environment=production" - ) ++ - reflectiveAccessOptions ++ - extraJavaOpts ++ - Seq("-jar", artifactTargetPath) + val entry = + s"java -Dorg.scalatra.environment=production $$JAVA_OPTS ${reflectiveAccessOptions.mkString(" ")} -jar $artifactTargetPath" new Dockerfile { from("eclipse-temurin:20-jdk") add(artifact, artifactTargetPath) - entryPoint(entry: _*) + entryPointRaw(entry) } }, docker / imageNames := Seq( diff --git a/project/imageapi.scala b/project/imageapi.scala index 612d667499..4e34bdefc1 100644 --- a/project/imageapi.scala +++ b/project/imageapi.scala @@ -64,7 +64,7 @@ object imageapi extends Module { libraryDependencies ++= dependencies ) ++ commonSettings ++ - dockerSettings("-Xmx6G") ++ + dockerSettings() ++ tsSettings ++ assemblySettings() diff --git a/project/searchapi.scala b/project/searchapi.scala index be1a2a7d70..6fbd043067 100644 --- a/project/searchapi.scala +++ b/project/searchapi.scala @@ -55,7 +55,7 @@ object searchapi extends Module { ) ++ commonSettings ++ assemblySettings() ++ - dockerSettings("-Xmx6G") ++ + dockerSettings() ++ tsSettings override lazy val plugins: Seq[sbt.Plugins] = Seq(