Dockerfile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. FROM ubuntu:18.10
  2. ENV TZ UTC
  3. RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
  4. RUN apt update && \
  5. apt install --no-install-recommends -y \
  6. ca-certificates cron \
  7. apache2 libapache2-mod-php \
  8. php-curl php-intl php-mbstring php-xml php-zip \
  9. php-sqlite3 php-mysql php-pgsql && \
  10. rm -rf /var/lib/apt/lists/
  11. RUN mkdir -p /var/www/FreshRSS /run/apache2/
  12. WORKDIR /var/www/FreshRSS
  13. COPY . /var/www/FreshRSS
  14. COPY ./Docker/*.Apache.conf /etc/apache2/sites-available/
  15. RUN a2dismod -f alias autoindex negotiation status && \
  16. a2enmod deflate expires headers mime setenvif && \
  17. a2disconf '*' && \
  18. a2dissite '*' && \
  19. a2ensite 'FreshRSS*'
  20. RUN sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" /etc/apache2/apache2.conf && \
  21. sed -r -i "/^\s*Listen /s/^/#/" /etc/apache2/ports.conf && \
  22. touch /var/www/FreshRSS/Docker/env.txt && \
  23. echo "17,47 * * * * . /var/www/FreshRSS/Docker/env.txt; \
  24. su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \
  25. 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" | crontab -
  26. ENV COPY_SYSLOG_TO_STDERR On
  27. ENV CRON_MIN ''
  28. ENTRYPOINT ["./Docker/entrypoint.sh"]
  29. EXPOSE 80
  30. CMD ([ -z "$CRON_MIN" ] || cron) && \
  31. . /etc/apache2/envvars && \
  32. exec apache2 -D FOREGROUND