From 423573a494064e5ef4fa20d912cebbda7e0d3092 Mon Sep 17 00:00:00 2001 From: KRUXLEX Date: Tue, 28 Jan 2020 11:22:03 +0100 Subject: [PATCH 1/2] Docker File for centos Need edit a /opt/entrypoint.sh and change last line to: `crontab /etc/crontab && tail -F /var/log/cron.log` --- imap2thehive/centos.Dockerfile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 imap2thehive/centos.Dockerfile diff --git a/imap2thehive/centos.Dockerfile b/imap2thehive/centos.Dockerfile new file mode 100644 index 0000000..ccaa92a --- /dev/null +++ b/imap2thehive/centos.Dockerfile @@ -0,0 +1,28 @@ +FROM +MAINTAINER Axel Gocan + +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" ] From 5c2de63587c6566efb8c868cd2edd41b85c567d5 Mon Sep 17 00:00:00 2001 From: KRUXLEX Date: Tue, 28 Jan 2020 11:28:33 +0100 Subject: [PATCH 2/2] Update centos.Dockerfile --- imap2thehive/centos.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imap2thehive/centos.Dockerfile b/imap2thehive/centos.Dockerfile index ccaa92a..1ca6b42 100644 --- a/imap2thehive/centos.Dockerfile +++ b/imap2thehive/centos.Dockerfile @@ -1,4 +1,4 @@ -FROM +FROM centos:7 MAINTAINER Axel Gocan RUN yum update && \