Skip to content

Commit 568818e

Browse files
committed
Made a helpful runnable docker container possible
1 parent 70cad00 commit 568818e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

build.sbt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import com.typesafe.sbt.packager.docker._
2+
13
ThisBuild / organization := "de.upb.cs.swt.delphi"
24
ThisBuild / organizationName := "Delphi Project"
35
ThisBuild / organizationHomepage := Some(url("https://delphi.cs.uni-paderborn.de/"))
@@ -68,10 +70,23 @@ libraryDependencies ++= Seq(
6870

6971

7072
debianPackageDependencies := Seq("java8-runtime-headless")
73+
mainClass in Compile := Some("de.upb.cs.swt.delphi.cli.DelphiCLI")
74+
discoveredMainClasses in Compile := Seq()
7175

7276
lazy val cli = (project in file(".")).
7377
enablePlugins(JavaAppPackaging).
7478
enablePlugins(DockerPlugin).
79+
settings(
80+
dockerBaseImage := "openjdk:jre-alpine",
81+
dockerAlias := com.typesafe.sbt.packager.docker.DockerAlias(None, Some("delphihub"),"delphi-cli", Some(version.value)),
82+
dockerEntrypoint := Seq("/bin/bash"),
83+
dockerCommands ++= Seq(
84+
Cmd("USER", "root"),
85+
Cmd("RUN", "apk", "--no-cache", "add", "bash"),
86+
Cmd("RUN", "ln", "-s", "/opt/docker/bin/delphi", "/usr/bin/delphi" ),
87+
Cmd("USER", "daemon")
88+
)
89+
).
7590
enablePlugins(ScalastylePlugin).
7691
enablePlugins(BuildInfoPlugin).
7792
enablePlugins(DebianPlugin).

0 commit comments

Comments
 (0)