From 7495b99522aaf3f9c795182d260573c2d235b2fd Mon Sep 17 00:00:00 2001 From: ian Date: Mon, 16 Feb 2015 11:48:02 +0200 Subject: [PATCH] added the SBT-Native-Packager plugin and set the build.sbt to create a kafka-manager docker with the sbt command: docker:publishLocal --- build.sbt | 21 +++++++++++++++++++++ project/plugins.sbt | 2 ++ 2 files changed, 23 insertions(+) diff --git a/build.sbt b/build.sbt index 02d180b8c..4b5ee4787 100644 --- a/build.sbt +++ b/build.sbt @@ -1,3 +1,8 @@ +import com.typesafe.sbt.SbtNativePackager._ +import com.typesafe.sbt.SbtNativePackager.autoImport._ +import com.typesafe.sbt.packager.archetypes.JavaAppPackaging +import com.typesafe.sbt.packager.docker.DockerPlugin + /** * Copyright 2015 Yahoo Inc. Licensed under the Apache License, Version 2.0 * See accompanying LICENSE file. @@ -38,3 +43,19 @@ pipelineStages := Seq(digest, gzip) includeFilter in (Assets, LessKeys.less) := "*.less" lazy val root = (project in file(".")).enablePlugins(PlayScala) + +enablePlugins(JavaAppPackaging) + +enablePlugins(DockerPlugin) + +packageName := packageName.value + +version := version.value + +dockerBaseImage := "zenphu/jzmq:latest" + +dockerExposedPorts := Seq(9000, 9443) + +dockerExposedVolumes := Seq("/opt/docker/logs") + +dockerEntrypoint := Seq("./bin/kafka-manager") diff --git a/project/plugins.sbt b/project/plugins.sbt index 088d66bef..1fed2c56b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -22,3 +22,5 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.2") addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0") addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.4") + +addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.0-M5")