Skip to content

Commit

Permalink
#110 Add support of responders in docker
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Jul 31, 2018
1 parent eee4f17 commit a924430
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ dockerCommands ~= { dc =>
"pip3 install -U pip setuptools && " +
"cd /opt && " +
"git clone https://github.com/TheHive-Project/Cortex-Analyzers.git && " +
"for I in Cortex-Analyzers/analyzers/*/requirements.txt; do pip2 install -r $I; done && " +
"for I in Cortex-Analyzers/analyzers/*/requirements.txt; do pip3 install -r $I || true; done"),
"for I in Cortex-Analyzers/analyzers/*/requirements.txt Cortex-Analyzers/responders/*/requirements.txt; do pip2 install -r $I; done && " +
"for I in Cortex-Analyzers/analyzers/*/requirements.txt Cortex-Analyzers/responders/*/requirements.txt; do pip3 install -r $I || true; done"),
Cmd("ADD", "var", "/var"),
Cmd("ADD", "etc", "/etc"),
ExecCmd("RUN", "chown", "-R", "daemon:root", "/var/log/cortex"),
Expand Down
4 changes: 4 additions & 0 deletions package/docker/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CONFIG_ES=1
CONFIG=1
CONFIG_FILE=/etc/cortex/application.conf
ANALYZER_PATH=/opt/Cortex-Analyzers/analyzers
RESPONDER_PATH=/opt/Cortex-Analyzers/responders

function usage {
cat <<- _EOF_
Expand All @@ -17,6 +18,7 @@ function usage {
--es-hostname <host> | resolve this hostname to find elasticseach instances
--secret <secret> | secret to secure sessions
--analyzer-path <path> | where analyzers are located
--responder-path <path> | where responders are located
_EOF_
exit 1
}
Expand All @@ -32,6 +34,7 @@ do
"--es-hostname") shift; ES_HOSTNAME=$1;;
"--secret") shift; SECRET=$1;;
"--analyzer-path") shift; ANALYZER_PATH=$1;;
"--responder-path") shift; RESPONDER_PATH=$1;;
"--") STOP=1;;
*) usage
esac
Expand Down Expand Up @@ -79,6 +82,7 @@ then
fi

echo analyzer.path=[\"$ANALYZER_PATH\"] >> $CONFIG_FILE
echo responder.path=[\"$RESPONDER_PATH\"] >> $CONFIG_FILE

echo 'include file("/etc/cortex/application.conf")' >> $CONFIG_FILE
fi
Expand Down

0 comments on commit a924430

Please sign in to comment.