Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions imap2thehive/centos.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM centos:7
MAINTAINER Axel Gocan <axel.gocan@protonmail.com>

RUN yum update && \
yum install -y gcc python3 crontabs python3-devel python3-pip cron logrotate && \
rm -rf /var/lib/apt/lists/*

WORKDIR /tmp
COPY requirements.txt .
RUN pip3 install -r requirements.txt

WORKDIR /etc
COPY imap2thehive.conf .

WORKDIR /opt
COPY imap2thehive.py .
COPY imap2thehive.whitelists .

# Create the cronjob
# An empty line is mandatory!
RUN echo '*/5 * * * * root (/opt/imap2thehive.py -c /etc/imap2thehive.conf -v >>/var/log/cron.log 2>&1)' >>/etc/crontab
RUN echo '' >>/etc/crontab
RUN touch /var/log/cron.log
RUN touch /.firstboot
COPY entrypoint.sh .
RUN chmod 0755 /opt/entrypoint.sh

ENTRYPOINT [ "/opt/entrypoint.sh" ]