Dockerfile-Newest 2.8 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 php82-apache2 \
  8. apache-mod-auth-openidc \
  9. php82 php82-curl php82-gmp php82-intl php82-mbstring php82-xml php82-zip \
  10. php82-ctype php82-dom php82-fileinfo php82-iconv php82-json php82-opcache php82-openssl php82-phar php82-session php82-simplexml php82-xmlreader php82-xmlwriter php82-xml php82-tokenizer php82-zlib \
  11. php82-pdo_sqlite php82-pdo_mysql php82-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_BRANCH
  18. ARG SOURCE_COMMIT
  19. LABEL \
  20. org.opencontainers.image.authors="Alkarex" \
  21. org.opencontainers.image.description="A self-hosted RSS feed aggregator" \
  22. org.opencontainers.image.documentation="https://freshrss.github.io/FreshRSS/" \
  23. org.opencontainers.image.licenses="AGPL-3.0" \
  24. org.opencontainers.image.revision="${SOURCE_BRANCH}.${SOURCE_COMMIT}" \
  25. org.opencontainers.image.source="https://github.com/FreshRSS/FreshRSS" \
  26. org.opencontainers.image.title="FreshRSS" \
  27. org.opencontainers.image.url="https://freshrss.org/" \
  28. org.opencontainers.image.vendor="FreshRSS" \
  29. org.opencontainers.image.version="$FRESHRSS_VERSION"
  30. RUN rm -f /etc/apache2/conf.d/languages.conf /etc/apache2/conf.d/info.conf \
  31. /etc/apache2/conf.d/status.conf /etc/apache2/conf.d/userdir.conf && \
  32. sed -r -i "/^\s*LoadModule .*mod_(alias|autoindex|negotiation|status).so$/s/^/#/" \
  33. /etc/apache2/httpd.conf && \
  34. sed -r -i "/^\s*#\s*LoadModule .*mod_(deflate|expires|headers|mime|remoteip|setenvif).so$/s/^\s*#//" \
  35. /etc/apache2/httpd.conf && \
  36. sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" \
  37. /etc/apache2/httpd.conf && \
  38. if [ ! -f /usr/bin/php ]; then ln -s /usr/bin/php82 /usr/bin/php; else true; fi && \
  39. echo 'memory_limit = 256M' > /etc/php82/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')