diff --git a/Dockerfile b/Dockerfile index e0157f7..3c5d148 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,7 @@ ENV REPORT_PARSER_SOURCE="https://github.com/techsneeze/dmarcts-report-parser/ar COPY ./manifest/ / RUN set -x \ + && apk update \ && apk add expat-dev mariadb-dev \ && wget -q --no-check-certificate -O parser.zip $REPORT_PARSER_SOURCE \ && wget -q --no-check-certificate -O viewer.zip $REPORT_VIEWER_SOURCE \ @@ -33,6 +34,8 @@ RUN set -x \ PerlIO::gzip \ IO::Socket::SSL \ ; do cpan install $i; done \ + && apk del mariadb-dev expat-dev \ + && apk add mariadb-client-libs \ && sed -i 's%.*root /var/www/html;% root /var/www/viewer;%g' /etc/nginx/conf.d/default.conf \ && 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 diff --git a/manifest/entrypoint.sh b/manifest/entrypoint.sh index bca9b74..46fb0ee 100644 --- a/manifest/entrypoint.sh +++ b/manifest/entrypoint.sh @@ -40,7 +40,8 @@ if [[ -v TEMPLATE_PERL_CONF ]] ; then fi if [[ -v PARSER_PROCESS_INTERVAL ]] ; then - echo "${PARSER_PROCESS_INTERVAL} /usr/bin/dmarcts-report-parser.pl -i -d -r" > /etc/cron.d/root + cmd=$(awk '{$1=""; print $0}' /etc/cron.d/root) + echo -n "${PARSER_PROCESS_INTERVAL} ${cmd}" > /etc/cron.d/root fi # Start supervisord and services