I'm using the sbt-native-packager to build my Docker image and publish it to my local. I have a custom directory where I have some files that I would like to be part of the resulting Docker file system. I have tried the following in my build.sbt:
Universal / mappings += (file("data/housing.tgz"), "/opt/docker/data/housing.tgz")
But this results in an error as below:
[info] welcome to sbt 1.5.7 (Private Build Java 1.8.0_312)
[info] loading settings for project housing-price-prediction-data-preparation-build from plugins.sbt ...
[info] loading project definition from /home/joesan/Projects/Private/ml-projects/housing-price-prediction-data-preparation/project
[info] loading settings for project housing-price-prediction-data-preparation from build.sbt ...
[info] resolving key references (10159 settings) ...
Reference to undefined setting:
Universal / mappings from Universal / mappings (/home/joesan/Projects/Private/ml-projects/housing-price-prediction-data-preparation/build.sbt:58)
at sbt.internal.util.Init.Uninitialized(Settings.scala:419)
at sbt.internal.util.Init.Uninitialized$(Settings.scala:406)
at sbt.Def$.Uninitialized(Def.scala:24)
at sbt.internal.util.Init.delegate(Settings.scala:313)
at sbt.internal.util.Init.delegate$(Settings.scala:275)
at sbt.Def$.delegate(Def.scala:24)
at sbt.internal.util.Init.compiled(Settings.scala:200)
at sbt.internal.util.Init.compiled$(Settings.scala:187)
at sbt.Def$.compiled(Def.scala:24)
at sbt.internal.util.Init.makeWithCompiledMap(Settings.scala:217)
at sbt.internal.util.Init.makeWithCompiledMap$(Settings.scala:212)
at sbt.Def$.makeWithCompiledMap(Def.scala:24)
at sbt.internal.Load$.$anonfun$apply$5(Load.scala:263)
at sbt.internal.Load$.timed(Load.scala:1393)
at sbt.internal.Load$.apply(Load.scala:255)
at sbt.internal.Load$.defaultLoad(Load.scala:56)
at sbt.BuiltinCommands$.liftedTree1$1(Main.scala:959)
at sbt.BuiltinCommands$.doLoadProject(Main.scala:959)
at sbt.BuiltinCommands$.$anonfun$loadProjectImpl$2(Main.scala:912)
at sbt.Command$.$anonfun$applyEffect$4(Command.scala:150)
at sbt.Command$.$anonfun$applyEffect$2(Command.scala:145)
at sbt.Command$.process(Command.scala:189)
at sbt.MainLoop$.$anonfun$processCommand$5(MainLoop.scala:245)
at scala.Option.getOrElse(Option.scala:189)
at sbt.MainLoop$.process$1(MainLoop.scala:245)
at sbt.MainLoop$.processCommand(MainLoop.scala:278)
at sbt.MainLoop$.$anonfun$next$5(MainLoop.scala:163)
at sbt.State$StateOpsImpl$.runCmd$1(State.scala:289)
at sbt.State$StateOpsImpl$.process$extension(State.scala:325)
at sbt.MainLoop$.$anonfun$next$4(MainLoop.scala:163)
at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
at sbt.MainLoop$.next(MainLoop.scala:163)
at sbt.MainLoop$.run(MainLoop.scala:144)
at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:119)
at sbt.io.Using.apply(Using.scala:27)
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:112)
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:66)
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:51)
at sbt.MainLoop$.runLogged(MainLoop.scala:42)
at sbt.StandardMain$.runManaged(Main.scala:218)
at sbt.xMain$.$anonfun$run$11(Main.scala:133)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
at scala.Console$.withIn(Console.scala:230)
at sbt.internal.util.Terminal$.withIn(Terminal.scala:569)
at sbt.internal.util.Terminal$.$anonfun$withStreams$1(Terminal.scala:350)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
at scala.Console$.withOut(Console.scala:167)
at sbt.internal.util.Terminal$.$anonfun$withOut$2(Terminal.scala:559)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
at scala.Console$.withErr(Console.scala:196)
at sbt.internal.util.Terminal$.withOut(Terminal.scala:559)
at sbt.internal.util.Terminal$.withStreams(Terminal.scala:350)
at sbt.xMain$.withStreams$1(Main.scala:87)
at sbt.xMain$.run(Main.scala:121)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sbt.internal.XMainConfiguration.run(XMainConfiguration.java:56)
at sbt.xMain.run(Main.scala:46)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:111)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:130)
at xsbt.boot.Launch$.run(Launch.scala:111)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:37)
at xsbt.boot.Launch$.launch(Launch.scala:119)
at xsbt.boot.Launch$.apply(Launch.scala:20)
at xsbt.boot.Boot$.runImpl(Boot.scala:56)
at xsbt.boot.Boot$.main(Boot.scala:18)
at xsbt.boot.Boot.main(Boot.scala)
[error] Reference to undefined setting:
[error]
[error] Universal / mappings from Universal / mappings (/home/joesan/Projects/Private/ml-projects/housing-price-prediction-data-preparation/build.sbt:58)
[error]
[error] Use 'last' for the full log.
[warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r)
Isn't like this how I should be adding additional folders? What is causing this error?
My plugins.sbt has the following:
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.1.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.9")