不要将子模块发布到docker

时间:2016-06-27 09:48:19

标签: sbt-native-packager

我有两个项目:

val common = Project("common", file("common"))
        .enablePlugins(PlayScala)
val frontend = Project("frontend", file("frontend"))
        .enablePlugins(PlayScala)
        .dependsOn(common).aggregate(common)

现在,我想做一个开箱即用的Docker构建,但是当我做

sbt "project frontend" docker:publish

它会将这两个模块发布到docker。如何防止将common模块推送到docker注册表。

1 个答案:

答案 0 :(得分:2)

您可以删除aggregate(commons)或覆盖docker:publishLocal任务,如下所示:

...
 . settings(
   publishLocal in Docker := {}
 )