Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/dockerization #582

Merged
merged 2 commits into from
Dec 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,34 @@ enablePlugins(SbtNativePackager)

enablePlugins(SystemdPlugin)


enablePlugins(sbtdocker.DockerPlugin)
dockerfile in docker := {
val zipFile: File = dist.value

new Dockerfile {
from("openjdk:8-jre")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are using jdk8 while the minimum requirements is 11+ in project readme

add(zipFile, file("/opt/kafka-manager.zip"))
workDir("/opt")
run("unzip", "kafka-manager.zip")
run("rm", "-f", "kafka-manager.zip")

expose(9000)

cmd(s"kafka-manager-${version.value}/bin/kafka-manager")
}
}

imageNames in docker := Seq(
ImageName(
s"${name.value}:${version.value}"
)
)

buildOptions in docker := BuildOptions(
pullBaseImage = BuildOptions.Pull.Always
)

/*
* Start service as user root
*/
Expand Down
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ resolvers += Classpaths.sbtPluginReleases
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.3.3")

addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.0.0")

addSbtPlugin("se.marcuslonnberg" % "sbt-docker" % "1.5.0")