Dockerfile-QEMU-ARM 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Only relevant for Docker Hub or QEMU multi-architecture builds.
  2. # Prefer the normal `Dockerfile` if you are building manually on the targeted architecture.
  3. FROM arm32v7/debian:12-slim
  4. # Requires ./hooks/*
  5. COPY ./Docker/qemu-arm-* /usr/bin/
  6. ENV TZ UTC
  7. SHELL ["/bin/bash", "-o", "pipefail", "-c"]
  8. ARG DEBIAN_FRONTEND=noninteractive
  9. RUN apt-get update && \
  10. apt-get install --no-install-recommends -y \
  11. ca-certificates cron \
  12. apache2 libapache2-mod-php \
  13. libapache2-mod-auth-openidc \
  14. php-curl php-gmp php-intl php-mbstring php-xml php-zip \
  15. php-sqlite3 php-mysql php-pgsql && \
  16. rm -rf /var/lib/apt/lists/*
  17. RUN mkdir -p /var/www/FreshRSS/ /run/apache2/
  18. WORKDIR /var/www/FreshRSS
  19. COPY . /var/www/FreshRSS
  20. COPY ./Docker/*.Apache.conf /etc/apache2/sites-available/
  21. ARG FRESHRSS_VERSION
  22. ARG SOURCE_BRANCH
  23. ARG SOURCE_COMMIT
  24. LABEL \
  25. org.opencontainers.image.authors="Alkarex" \
  26. org.opencontainers.image.description="A self-hosted RSS feed aggregator" \
  27. org.opencontainers.image.documentation="https://freshrss.github.io/FreshRSS/" \
  28. org.opencontainers.image.licenses="AGPL-3.0" \
  29. org.opencontainers.image.revision="${SOURCE_BRANCH}.${SOURCE_COMMIT}" \
  30. org.opencontainers.image.source="https://github.com/FreshRSS/FreshRSS" \
  31. org.opencontainers.image.title="FreshRSS" \
  32. org.opencontainers.image.url="https://freshrss.org/" \
  33. org.opencontainers.image.vendor="FreshRSS" \
  34. org.opencontainers.image.version="$FRESHRSS_VERSION"
  35. RUN a2dismod -q -f alias autoindex negotiation status && \
  36. a2dismod -q auth_openidc && \
  37. a2enmod -q deflate expires headers mime remoteip setenvif && \
  38. a2disconf -q '*' && \
  39. a2dissite -q '*' && \
  40. a2ensite -q 'FreshRSS*'
  41. RUN sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" /etc/apache2/apache2.conf && \
  42. sed -r -i "/^\s*Listen /s/^/#/" /etc/apache2/ports.conf && \
  43. # Disable built-in updates when using Docker, as the full image is supposed to be updated instead.
  44. sed -r -i "\\#disable_update#s#^.*#\t'disable_update' => true,#" ./config.default.php && \
  45. touch /var/www/FreshRSS/Docker/env.txt && \
  46. echo "17,47 * * * * . /var/www/FreshRSS/Docker/env.txt; \
  47. su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \
  48. 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" > /etc/crontab.freshrss.default
  49. # Seems needed for arm32v7/ubuntu on Docker Hub
  50. RUN update-ca-certificates -f
  51. # Useful with the `--squash` build option
  52. RUN rm /usr/bin/qemu-* /var/www/FreshRSS/Docker/qemu-*
  53. ENV COPY_LOG_TO_SYSLOG On
  54. ENV COPY_SYSLOG_TO_STDERR On
  55. ENV CRON_MIN ''
  56. ENV DATA_PATH ''
  57. ENV FRESHRSS_ENV ''
  58. ENV LISTEN ''
  59. ENV OIDC_ENABLED ''
  60. ENV TRUSTED_PROXY ''
  61. ENTRYPOINT ["./Docker/entrypoint.sh"]
  62. EXPOSE 80
  63. # hadolint ignore=DL3025
  64. CMD ([ -z "$CRON_MIN" ] || cron) && \
  65. . /etc/apache2/envvars && \
  66. exec apache2 -D FOREGROUND $([ -n "$OIDC_ENABLED" ] && [ "$OIDC_ENABLED" -ne 0 ] && echo '-D OIDC_ENABLED')