-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sbt
executable file
·50 lines (33 loc) · 1.23 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import com.typesafe.sbt.packager.docker.{Cmd, ExecCmd}
organization := "codacy"
name := "codacy-shellcheck"
version := "1.0.0-SNAPSHOT"
val languageVersion = "2.12.9"
scalaVersion := languageVersion
resolvers ++= Seq(
"Sonatype OSS Snapshots".at("https://oss.sonatype.org/content/repositories/releases"),
"Typesafe Repo".at("http://repo.typesafe.com/typesafe/releases/")
)
libraryDependencies ++= Seq("com.codacy" %% "codacy-engine-scala-seed" % "3.0.296" withSources ())
enablePlugins(AshScriptPlugin)
enablePlugins(DockerPlugin)
version in Docker := "1.0"
mappings in Universal ++= {
(resourceDirectory in Compile) map { (resourceDir: File) =>
val src = resourceDir / "docs"
val dest = "/docs"
for {
path <- src.allPaths.get if !path.isDirectory
} yield path -> path.toString.replaceFirst(src.toString, dest)
}
}.value
val dockerUser = "docker"
val dockerGroup = "docker"
daemonUser in Docker := dockerUser
daemonGroup in Docker := dockerGroup
dockerBaseImage := s"codacy/alpine-jre-shellcheck"
dockerCommands := dockerCommands.value.flatMap {
case cmd @ Cmd("ADD", _) =>
List(Cmd("RUN", s"adduser -u 2004 -D $dockerUser"), cmd, Cmd("RUN", "mv /opt/docker/docs /docs"))
case other => List(other)
}