Skip to content

Commit b8dcf3d

Browse files
authored
Merge pull request #897 from softwaremill/fix-native-image-paths
fix configuration files paths in native docker image
2 parents af0a448 + f951d26 commit b8dcf3d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

build.sbt

+8-8
Original file line numberDiff line numberDiff line change
@@ -337,13 +337,13 @@ lazy val nativeServer: Project = (project in file("native-server"))
337337
// We want to include the image generated in stage0 around the COPY commands
338338
val lastIndexOfCopy = commands.lastIndexWhere {
339339
case Cmd("COPY", _) => true
340-
case _ => false
340+
case _ => false
341341
}
342342

343343
val (front, back) = commands.splitAt(lastIndexOfCopy + 1)
344344

345345
val updatedCommands = front.filter {
346-
case Cmd("COPY", args@_*) =>
346+
case Cmd("COPY", args @ _*) =>
347347
// We do not want to include jar layers (the one with number based root path: /1, /2, /3, etc.)
348348
args.head.startsWith("opt")
349349
case _ => true
@@ -356,17 +356,17 @@ lazy val nativeServer: Project = (project in file("native-server"))
356356
},
357357
Docker / defaultLinuxInstallLocation := "/opt/elasticmq",
358358
Docker / mappings ++= Seq(
359-
(baseDirectory.value / ".." / "server" / "docker" / "elasticmq.conf") -> "/opt/elasticmq/elasticmq.conf",
360-
(baseDirectory.value / ".." / "server" / "src" / "main" / "resources" / "logback.xml") -> "/opt/elasticmq/logback.xml",
361-
) ++ sbt.Path.contentOf(baseDirectory.value / ".." / "ui" / "build").map {
362-
case (file, mapping) => (file, "/opt/elasticmq/" + mapping)
359+
(baseDirectory.value / ".." / "server" / "docker" / "elasticmq.conf") -> "/opt/elasticmq.conf",
360+
(baseDirectory.value / ".." / "server" / "src" / "main" / "resources" / "logback.xml") -> "/opt/logback.xml"
361+
) ++ sbt.Path.contentOf(baseDirectory.value / ".." / "ui" / "build").map { case (file, mapping) =>
362+
(file, "/opt/elasticmq/" + mapping)
363363
},
364364
dockerEntrypoint := Seq(
365365
"/sbin/tini", // tini makes it possible to kill the process with Cmd+C/Ctrl+C when running in interactive mode (-it)
366366
"--",
367367
"/opt/elasticmq/bin/elasticmq-native-server",
368-
"-Dconfig.file=/opt/elasticmq/elasticmq.conf",
369-
"-Dlogback.configurationFile=/opt/elasticmq/logback.xml"
368+
"-Dconfig.file=/opt/elasticmq.conf",
369+
"-Dlogback.configurationFile=/opt/logback.xml"
370370
),
371371
dockerUpdateLatest := {
372372
!version.value.toLowerCase.contains("rc")

0 commit comments

Comments
 (0)