Created
March 3, 2021 20:27
-
-
Save colinbes/719184e733057344fd22339c36c927d1 to your computer and use it in GitHub Desktop.
build.sbt snippet for enabling dockering a scala application using sbt-native-packager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.typesafe.sbt.packager.docker.{ExecCmd, _} | |
enablePlugins(JavaAppPackaging) | |
enablePlugins(DockerPlugin) | |
dockerBaseImage := "openjdk:8-jre-alpine" | |
dockerExposedPorts := Seq(8082) | |
dockerRepository := Some("bdesigns") | |
daemonUser in Docker := "daemon" | |
//packageName in Docker := "server-akka" | |
dockerCommands ++= Seq( | |
Cmd("USER", "root"), | |
ExecCmd("RUN", "apk", "add", "--no-cache", "bash") | |
) | |
scriptClasspath in bashScriptDefines ~= (cp => "/etc/akka-server" +: cp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment