Dockerfile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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
  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 if [ ! -d '/usr/local/apache2/htdocs/dada' ]; then cp -vr $WDIR/* $HTDOCS ; fi ; \
  29. if [ ! -d '/usr/local/apache2/htdocs/dada/dada_mail_support_files' ]; then \
  30. mkdir -p $HTDOCS/dada_mail_support_files ; fi ; \
  31. chown -R daemon:daemon $HTDOCS $DATA && chmod 2755 $HTDOCS && \
  32. service cron start && httpd-foreground
  33. # http://localhost:8080/dada/installer/install.cgi