Dockerfile.j2 1.76 KB
Newer Older
Bozidar Proevski's avatar
Bozidar Proevski committed
1
2
3
4
5
6
7
8
9
10
11
12
FROM {{repo}}/openjdk:{{version}}{{suffix}}

USER root
RUN echo "[thehive-project]" > /etc/yum.repos.d/thehive.repo && \
    echo "enabled=1" >> /etc/yum.repos.d/thehive.repo && \
    echo "priority=1" >> /etc/yum.repos.d/thehive.repo && \
    echo "name=TheHive-Project RPM repository" >> /etc/yum.repos.d/thehive.repo && \
    echo "baseurl=http://rpm.thehive-project.org/stable/noarch" >> /etc/yum.repos.d/thehive.repo && \
    echo "gpgcheck=1" >> /etc/yum.repos.d/thehive.repo && \
    yum install -y epel-release && \
    rpm --import https://raw.githubusercontent.com/TheHive-Project/TheHive/master/PGP-PUBLIC-KEY && \
    rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch && \
13
    yum install -y cortex supervisor daemonize vim net-tools telnet htop python3-pip.noarch git gcc python3-devel.x86_64 ssdeep-devel.x86_64 python3-wheel.noarch libexif-devel.x86_64 libexif.x86_64 perl-Image-ExifTool.noarch  gcc-c++ whois && \
Bozidar Proevski's avatar
Bozidar Proevski committed
14
15
16
17
18
19
20
21
22
23
24
25
26
    rpm -Uvh https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-6.8.13.rpm && \
    chown -R elasticsearch:elasticsearch /etc/elasticsearch && \
    mkdir -p /home/cortex && \
    chown -R cortex:cortex /home/cortex && \
    chown -R cortex:cortex /etc/cortex && \
    cd /opt && \
    git clone https://github.com/TheHive-Project/Cortex-Analyzers && \
    chown -R cortex:cortex /opt/Cortex-Analyzers && \
    cd /opt/Cortex-Analyzers && \
    for I in analyzers/*/requirements.txt; do LC_ALL=en_US.UTF-8 pip3 install --no-cache-dir -U -r $I || true; done && \
    for I in responders/*/requirements.txt; do LC_ALL=en_US.UTF-8 pip3 install --no-cache-dir -U -r $I || true; done && \
    yum -y clean all
EXPOSE 9001
27
28
COPY cortexsupervisord.conf /etc/supervisord.conf
ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]