Dockerfile-QEMU-ARM 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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:10-slim
  4. # Requires ./hooks/*
  5. COPY ./Docker/qemu-arm-* /usr/bin/
  6. ENV TZ UTC
  7. SHELL ["/bin/bash", "-o", "pipefail", "-c"]
  8. RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
  9. RUN apt-get update && \
  10. apt-get install --no-install-recommends -y \
  11. ca-certificates cron \
  12. apache2 libapache2-mod-php \
  13. php-curl php-gmp php-intl php-mbstring php-xml php-zip \
  14. php-sqlite3 php-mysql php-pgsql && \
  15. rm -rf /var/lib/apt/lists/*
  16. RUN mkdir -p /var/www/FreshRSS/ /run/apache2/
  17. WORKDIR /var/www/FreshRSS
  18. COPY . /var/www/FreshRSS
  19. COPY ./Docker/*.Apache.conf /etc/apache2/sites-available/
  20. ARG FRESHRSS_VERSION
  21. ARG SOURCE_BRANCH
  22. ARG SOURCE_COMMIT
  23. LABEL \
  24. org.opencontainers.image.authors="Alkarex" \
  25. org.opencontainers.image.description="A self-hosted RSS feed aggregator" \
  26. org.opencontainers.image.documentation="https://freshrss.github.io/FreshRSS/" \
  27. org.opencontainers.image.licenses="AGPL-3.0" \
  28. org.opencontainers.image.revision="${SOURCE_BRANCH}.${SOURCE_COMMIT}" \
  29. org.opencontainers.image.source="https://github.com/FreshRSS/FreshRSS" \
  30. org.opencontainers.image.title="FreshRSS" \
  31. org.opencontainers.image.url="https://freshrss.org/" \
  32. org.opencontainers.image.vendor="FreshRSS" \
  33. org.opencontainers.image.version="$FRESHRSS_VERSION"
  34. RUN a2dismod -f alias autoindex negotiation status && \
  35. a2enmod deflate expires headers mime remoteip setenvif && \
  36. a2disconf '*' && \
  37. a2dissite '*' && \
  38. a2ensite 'FreshRSS*'
  39. RUN sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" /etc/apache2/apache2.conf && \
  40. sed -r -i "/^\s*Listen /s/^/#/" /etc/apache2/ports.conf && \
  41. touch /var/www/FreshRSS/Docker/env.txt && \
  42. echo "17,47 * * * * . /var/www/FreshRSS/Docker/env.txt; \
  43. su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \
  44. 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" | crontab -
  45. # Seems needed for arm32v7/ubuntu on Docker Hub
  46. RUN update-ca-certificates -f
  47. # Useful with the `--squash` build option
  48. RUN rm /usr/bin/qemu-* /var/www/FreshRSS/Docker/qemu-*
  49. ENV COPY_LOG_TO_SYSLOG On
  50. ENV COPY_SYSLOG_TO_STDERR On
  51. ENV CRON_MIN ''
  52. ENV FRESHRSS_ENV ''
  53. ENTRYPOINT ["./Docker/entrypoint.sh"]
  54. EXPOSE 80
  55. # hadolint ignore=DL3025
  56. CMD ([ -z "$CRON_MIN" ] || cron) && \
  57. . /etc/apache2/envvars && \
  58. exec apache2 -D FOREGROUND