-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
common: Prune system libs from distroless image (close #728)
- Loading branch information
Showing
3 changed files
with
20 additions
and
35 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ import sbtbuildinfo.BuildInfoPlugin.autoImport.{BuildInfoKey, buildInfoKeys, bui | |
import sbtdynver.DynVerPlugin.autoImport._ | ||
import com.typesafe.sbt.SbtNativePackager.autoImport._ | ||
import com.typesafe.sbt.packager.archetypes.jar.LauncherJarPlugin.autoImport.packageJavaLauncherJar | ||
import com.typesafe.sbt.packager.docker.DockerPermissionStrategy | ||
import com.typesafe.sbt.packager.docker.DockerPlugin.autoImport._ | ||
import com.typesafe.sbt.packager.linux.LinuxPlugin.autoImport._ | ||
import com.typesafe.sbt.packager.universal.UniversalPlugin.autoImport._ | ||
|
@@ -194,28 +193,14 @@ object BuildSettings { | |
) | ||
|
||
lazy val dockerSettingsFocal = Seq( | ||
Universal / javaOptions ++= Seq("-Dnashorn.args=--language=es6"), | ||
Docker / maintainer := "Snowplow Analytics Ltd. <[email protected]>", | ||
dockerBaseImage := "eclipse-temurin:11-jre-focal", | ||
dockerRepository := Some("snowplow"), | ||
Docker / daemonUser := "snowplow", | ||
Docker / defaultLinuxInstallLocation := "/home/snowplow", | ||
dockerUpdateLatest := true | ||
Universal / javaOptions ++= Seq("-Dnashorn.args=--language=es6") | ||
) | ||
|
||
lazy val dockerSettingsDistroless = Seq( | ||
Universal / javaOptions ++= Seq("-Dnashorn.args=--language=es6"), | ||
Docker / maintainer := "Snowplow Analytics Ltd. <[email protected]>", | ||
dockerBaseImage := "gcr.io/distroless/java11-debian11:nonroot", | ||
Docker / daemonUser := "nonroot", | ||
Docker / daemonGroup := "nonroot", | ||
dockerRepository := Some("snowplow"), | ||
Docker / daemonUserUid := None, | ||
Docker / defaultLinuxInstallLocation := "/home/snowplow", | ||
dockerEntrypoint := Seq("java", "-jar",s"/home/snowplow/lib/${(packageJavaLauncherJar / artifactPath).value.getName}"), | ||
dockerPermissionStrategy := DockerPermissionStrategy.CopyChown, | ||
dockerAlias := dockerAlias.value.copy(tag = dockerAlias.value.tag.map(t => s"$t-distroless")), | ||
dockerUpdateLatest := false | ||
dockerEntrypoint := { | ||
val orig = dockerEntrypoint.value | ||
orig.head +: "-Dnashorn.args=--language=es6" +: orig.tail | ||
} | ||
) | ||
|
||
// TESTS | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9") | ||
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0") | ||
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.7") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") | ||
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.17") | ||
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.1") | ||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.2") | ||
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.0") | ||
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") | ||
addSbtPlugin("com.snowplowanalytics" % "sbt-snowplow-release" % "0.1.0") |