Dockerfile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. FROM uniqrn/perl-fcgi
  2. MAINTAINER Paul Klumpp
  3. ENV HTDOCS /usr/local/apache2/htdocs
  4. ENV DATA /opt/dada
  5. ENV WDIR /root/wdir
  6. VOLUME ["$DATA", "$HTDOCS"]
  7. RUN usermod -d $DATA daemon
  8. RUN mkdir -p $DATA && chown -R daemon:daemon $DATA && chmod 2755 $DATA
  9. RUN mkdir -p $WDIR
  10. RUN apt-get update -y && apt-get upgrade -y && apt-get install -y apt-utils
  11. RUN apt-get install -y cron curl build-essential vim
  12. RUN apt-get install -y libxml-perl libsoap-lite-perl libdbd-mysql-perl libnet-dns-perl libhtml-tree-perl libio-socket-ssl-perl libcrypt-ssleay-perl libxmlrpc-lite-perl libgravatar-url-perl
  13. #ENV PERL_MM_USE_DEFAULT=1
  14. #ENV PERL_EXTUTILS_AUTOINSTALL="--defaultdeps"
  15. RUN curl -L https://cpanmin.us | perl - --force App::cpanminus
  16. RUN apt-get install -y pkg-config libgd-dev libcurl4-openssl-dev libxml2-dev
  17. RUN cpanm -i Image::Resize WWW::StopForumSpam CSS::Inliner Bundle::DadaMail # this failed so hard before.
  18. COPY httpd.conf /usr/local/apache2/conf/
  19. WORKDIR $WDIR
  20. #COPY ./dada-10_7_0.tar.gz ./
  21. RUN pwd && curl -L -O https://netcologne.dl.sourceforge.net/project/dadamail/dada-10_7_0.tar.gz
  22. RUN curl -L -O https://raw.github.com/justingit/dada-mail/v10_7_0-stable_2017_07_05/uncompress_dada.cgi
  23. RUN ls -l
  24. RUN cd $WDIR && /usr/bin/perl -T $WDIR/uncompress_dada.cgi && rm uncompress_dada.cgi && cp -rv $WDIR/* $HTDOCS/
  25. RUN echo '*/5 * * * * /usr/bin/curl --user-agent "Mozilla/5.0 (compatible;)" --silent --get --url http://localhost/dada/mail.cgi/_schedules/_all/_all/_silent/' > /var/spool/cron/crontabs/root
  26. RUN mkdir -p $HTDOCS/dada_mail_support_files && chown -R daemon:daemon $HTDOCS && chmod 2755 $HTDOCS
  27. USER root
  28. CMD service cron start && httpd-foreground
  29. # http://localhost:8080/dada/installer/install.cgi