Dockerfile-Newest 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. FROM alpine:edge
  2. ENV TZ=UTC
  3. SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
  4. RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \
  5. apk add --no-cache \
  6. tzdata \
  7. apache2 php84-apache2 \
  8. apache-mod-auth-openidc \
  9. php84 php84-curl php84-gmp php84-intl php84-mbstring php84-xml php84-zip \
  10. php84-ctype php84-dom php84-fileinfo php84-iconv php84-json php84-opcache php84-openssl php84-phar php84-session php84-simplexml php84-xmlreader php84-xmlwriter php84-xml php84-tokenizer php84-zlib \
  11. php84-pdo_sqlite php84-pdo_mysql php84-pdo_pgsql
  12. RUN mkdir -p /var/www/FreshRSS /run/apache2/
  13. WORKDIR /var/www/FreshRSS
  14. COPY . /var/www/FreshRSS
  15. COPY ./Docker/*.Apache.conf /etc/apache2/conf.d/
  16. ARG FRESHRSS_VERSION
  17. ARG SOURCE_COMMIT
  18. LABEL \
  19. org.opencontainers.image.authors="Alkarex" \
  20. org.opencontainers.image.description="A self-hosted RSS feed aggregator" \
  21. org.opencontainers.image.documentation="https://freshrss.github.io/FreshRSS/" \
  22. org.opencontainers.image.licenses="AGPL-3.0" \
  23. org.opencontainers.image.revision="${SOURCE_COMMIT}" \
  24. org.opencontainers.image.source="https://github.com/FreshRSS/FreshRSS" \
  25. org.opencontainers.image.title="FreshRSS" \
  26. org.opencontainers.image.url="https://freshrss.org/" \
  27. org.opencontainers.image.vendor="FreshRSS" \
  28. org.opencontainers.image.version="$FRESHRSS_VERSION"
  29. RUN rm -f /etc/apache2/conf.d/languages.conf /etc/apache2/conf.d/info.conf \
  30. /etc/apache2/conf.d/status.conf /etc/apache2/conf.d/userdir.conf && \
  31. sed -r -i "/^\s*LoadModule .*mod_(alias|autoindex|negotiation|status).so$/s/^/#/" \
  32. /etc/apache2/httpd.conf && \
  33. sed -r -i "/^\s*#\s*LoadModule .*mod_(deflate|expires|filter|headers|mime|remoteip|setenvif).so$/s/^\s*#//" \
  34. /etc/apache2/httpd.conf && \
  35. sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" \
  36. /etc/apache2/httpd.conf && \
  37. mv /etc/apache2/conf.d/mod-auth-openidc.conf /etc/apache2/conf.d/mod-auth-openidc.conf.bak && \
  38. if [ ! -f /usr/bin/php ]; then ln -s /usr/bin/php84 /usr/bin/php; else true; fi && \
  39. echo 'memory_limit = 256M' > /etc/php84/conf.d/10_memory.ini && \
  40. # Disable built-in updates when using Docker, as the full image is supposed to be updated instead.
  41. sed -r -i "\\#disable_update#s#^.*#\t'disable_update' => true,#" ./config.default.php && \
  42. touch /var/www/FreshRSS/Docker/env.txt && \
  43. echo "27,57 * * * * . /var/www/FreshRSS/Docker/env.txt; \
  44. su apache -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \
  45. 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" > /etc/crontab.freshrss.default
  46. ENV COPY_LOG_TO_SYSLOG=On
  47. ENV COPY_SYSLOG_TO_STDERR=On
  48. ENV CRON_MIN=''
  49. ENV DATA_PATH=''
  50. ENV FRESHRSS_ENV=''
  51. ENV LISTEN=''
  52. ENV OIDC_ENABLED=''
  53. ENV TRUSTED_PROXY=''
  54. ENTRYPOINT ["./Docker/entrypoint.sh"]
  55. EXPOSE 80
  56. # hadolint ignore=DL3025
  57. CMD ([ -z "$CRON_MIN" ] || crond -d 6) && \
  58. exec httpd -D FOREGROUND $([ -n "$OIDC_ENABLED" ] && [ "$OIDC_ENABLED" -ne 0 ] && echo '-D OIDC_ENABLED')