Skip to content

Commit

Permalink
#307 Fix file ownership to run docker image in Openshift
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Sep 15, 2017
1 parent b92908d commit 1142633
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,18 @@ mappings in Docker ~= (_.filterNot {
case (_, filepath) => filepath == "/opt/thehive/conf/application.conf"
})
dockerCommands ~= { dc =>
val (dockerInitCmds, dockerTailCmds) = dc.splitAt(4)
val (dockerInitCmds, dockerTailCmds) = dc
.collect {
case ExecCmd("RUN", "chown", _*) => ExecCmd("RUN", "chown", "-R", "daemon:root", ".")
case other => other
}
.splitAt(4)
dockerInitCmds ++
Seq(
Cmd("ADD", "var", "/var"),
Cmd("ADD", "etc", "/etc"),
ExecCmd("RUN", "chown", "-R", "daemon:daemon", "/var/log/thehive")) ++
ExecCmd("RUN", "chown", "-R", "daemon:root", "/var/log/thehive"),
ExecCmd("RUN", "chmod", "+x", "/opt/thehive/bin/thehive", "/opt/thehive/entrypoint")) ++
dockerTailCmds
}

Expand Down

0 comments on commit 1142633

Please sign in to comment.