Skip to content

Commit

Permalink
#413 Add missing python dependencies in cortex image
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Jun 21, 2022
1 parent cc29f71 commit 57e58a3
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions project/DockerSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,23 @@ object DockerSettings {
case (_, filepath) => filepath == "/opt/cortex/conf/application.conf"
}),
dockerCommands := Seq(
Cmd("FROM", "openjdk:8"),
Cmd("FROM", "openjdk:8-slim"),
Cmd("LABEL", "MAINTAINER=\"TheHive Project <[email protected]>\"", "repository=\"https://github.com/TheHive-Project/TheHive\""),
Cmd("WORKDIR", "/opt/cortex"),
// format: off
Cmd("RUN",
"apt", "update", "&&",
"apt", "upgrade", "-y", "&&",
"apt", "install", "-y", "iptables", "lxc", "wget", "&&",
"apt", "autoclean", "-y", "-q", "&&",
"apt", "autoremove", "-y", "-q", "&&",
"wget", "-q", "-O", "-", "https://download.docker.com/linux/static/stable/x86_64/docker-18.09.0.tgz", "|",
"tar", "-xzC", "/usr/local/bin/", "--strip-components", "1", "&&",
"addgroup", "--system", "dockremap", "&&",
"adduser", "--system", "--ingroup", "dockremap", "dockremap", "&&",
"addgroup", "--system", "docker", "&&",
"echo", "dockremap:165536:65536", ">>", "/etc/subuid", "&&",
"echo", "dockremap:165536:65536", ">>", "/etc/subgid", "&&",
"apt", "update", "&&",
"apt", "upgrade", "-y", "&&",
"apt", "install", "-y", "iptables", "lxc", "&&",
"apt", "autoclean", "-y", "-q", "&&",
"apt", "autoremove", "-y", "-q", "&&",
"rm", "-rf", "/var/lib/apt/lists/*", "&&",
"(", "type", "groupadd", "1>/dev/null", "2>&1", "&&",
"groupadd", "-g", "1001", "cortex", "||",
Expand Down Expand Up @@ -112,6 +112,11 @@ object DockerSettings {
| pip2 install $I || true &&
| pip3 install $I || true ;
| done &&
| for I in $(find /tmp/analyzers -name requirements.txt) ;
| do
| pip2 install -r $I || true &&
| pip3 install -r $I || true ;
| done &&
| rm -rf /tmp/analyzers
""".stripMargin.split("\\s").filter(_.nonEmpty): _*
)
Expand Down

0 comments on commit 57e58a3

Please sign in to comment.