Skip to content

Commit

Permalink
Merge branch '8ear-patch-2' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Aug 31, 2020
2 parents 58c9214 + c5a4dca commit a525a80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions docker.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ dockerCommands := Seq(
"apt", "autoremove", "-y", "-q", "&&",
"rm", "-rf", "/var/lib/apt/lists/*", "&&",
"(", "type", "groupadd", "1>/dev/null", "2>&1", "&&",
"groupadd", "-g", "1000", "cortex", "||",
"addgroup", "-g", "1000", "-S", "cortex",
"groupadd", "-g", "1001", "cortex", "||",
"addgroup", "-g", "1001", "-S", "cortex",
")", "&&",
"(", "type", "useradd", "1>/dev/null", "2>&1", "&&",
"useradd", "--system", "--uid", "1000", "--gid", "1000", "cortex", "||",
"adduser", "-S", "-u", "1000", "-G", "cortex", "cortex",
"useradd", "--system", "--uid", "1001", "--gid", "1001", "cortex", "||",
"adduser", "-S", "-u", "1001", "-G", "cortex", "cortex",
")"),
//format: on
Cmd("ADD", "--chown=root:root", "opt", "/opt"),
Cmd("ADD", "--chown=cortex:cortex", "var", "/var"),
Cmd("ADD", "--chown=cortex:cortex", "etc", "/etc"),
ExecCmd("RUN", "chmod", "+x", "/opt/cortex/bin/cortex", "/opt/cortex/entrypoint"),
Cmd("EXPOSE", "9001"),
Cmd("USER", "thehive"),
Cmd("USER", "cortex"),
ExecCmd("ENTRYPOINT", "/opt/cortex/entrypoint"),
ExecCmd("CMD")
)
4 changes: 2 additions & 2 deletions package/docker/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ DOCKER_PID=$!

echo config file is:
cat $CONFIG_FILE
su -s /bin/sh -c "cd /opt/cortex; bin/cortex \
/bin/sh -c "cd /opt/cortex; bin/cortex \
-Dconfig.file=$CONFIG_FILE \
-Dlogger.file=/etc/cortex/logback.xml \
-Dpidfile.path=/dev/null \
$@" daemon
$@"

test $START_DOCKER = 1 && kill ${DOCKER_PID}

0 comments on commit a525a80

Please sign in to comment.