docker-dmarc-report/Dockerfile

44 lines
1.5 KiB
Docker
Raw Normal View History

2018-03-31 19:35:32 +02:00
FROM boxedcode/alpine-nginx-php-fpm:latest
2016-11-28 21:42:24 +01:00
MAINTAINER Robert Schumann <gutmensch@n-os.org>
2018-03-31 19:35:32 +02:00
ENV REPORT_PARSER_SOURCE="https://github.com/techsneeze/dmarcts-report-parser/archive/master.zip" \
REPORT_VIEWER_SOURCE="https://github.com/techsneeze/dmarcts-report-viewer/archive/master.zip"
2017-01-02 00:13:03 +01:00
2018-03-31 19:35:32 +02:00
COPY ./manifest/ /
2016-11-28 23:14:57 +01:00
2016-11-28 22:48:27 +01:00
RUN set -x \
2018-03-31 20:21:32 +02:00
&& apk add expat-dev mariadb-dev \
2018-03-31 19:35:32 +02:00
&& wget -q --no-check-certificate -O parser.zip $REPORT_PARSER_SOURCE \
&& wget -q --no-check-certificate -O viewer.zip $REPORT_VIEWER_SOURCE \
2018-03-31 21:26:18 +02:00
&& unzip parser.zip && cp -v dmarcts-report-parser-master/* /usr/bin/ && rm -f parser.zip \
&& unzip viewer.zip && cp -v dmarcts-report-viewer-master/* /var/www/html/ && rm -f viewer.zip \
2018-03-31 21:28:50 +02:00
&& rm -f /var/www/html/index.php \
2018-03-31 21:47:10 +02:00
&& sed -i "1s/^/body { font-family: Sans-Serif; }\n/" /var/www/html/default.css \
2018-03-31 19:35:32 +02:00
&& (echo y;echo o conf prerequisites_policy follow;echo o conf commit)|cpan \
&& for i in \
IO::Compress::Gzip \
Getopt::Long \
Mail::IMAPClient \
Mail::Mbox::MessageParser \
MIME::Base64 \
MIME::Words \
MIME::Parser \
MIME::Parser::Filer \
2018-03-31 20:21:32 +02:00
XML::Parser \
2018-03-31 19:35:32 +02:00
XML::Simple \
DBI \
2018-03-31 20:21:32 +02:00
DBD::mysql \
2018-03-31 19:35:32 +02:00
Socket \
Socket6 \
PerlIO::gzip \
IO::Socket::SSL \
; do cpan install $i; done \
&& sed -i 's/.*index index.php index.html index.htm;/index dmarcts-report-viewer.php;/g' /etc/nginx/conf.d/default.conf \
&& chmod 755 /entrypoint.sh
EXPOSE 443 80
CMD ["/bin/bash", "/entrypoint.sh"]