sbt docker bashScriptExtraDefines: command not found

63 views Asked by At

I had an issue, which I found solution for here. So, now I have in build.sbt:

.settings(dockerEntrypoint := Seq("/opt/docker/bin/service-main"))
.settings(bashScriptExtraDefines ++= serviceJavaOpts)
    
 val serviceJavaOpts = List(
   "-Xmx2G"
 )

But it gives error:

/opt/docker/bin/service-main: line 354: -Xmx2G: command not found.

How do we set bashScriptExtraDefines in this case?

1

There are 1 answers

0
Mandroid On

I actually needed to have this:

val serviceJavaOpts = List(
   "-Xmx2G"
 )
.map { option => s"""addJava "$option"""" }

This works.