| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- FROM debian:13-slim
- ENV TZ=UTC
- SHELL ["/bin/bash", "-o", "pipefail", "-c"]
- ARG DEBIAN_FRONTEND=noninteractive
- RUN apt-get update && \
- apt-get install --no-install-recommends -y \
- ca-certificates cron \
- apache2 libapache2-mod-php \
- libapache2-mod-auth-openidc \
- php-curl php-gmp php-intl php-mbstring php-xml php-zip \
- php-sqlite3 php-mysql php-pgsql && \
- rm -rf /var/lib/apt/lists/*
- RUN mkdir -p /var/www/FreshRSS/ /run/apache2/
- WORKDIR /var/www/FreshRSS
- COPY --chown=root:www-data . /var/www/FreshRSS
- COPY ./Docker/*.Apache.conf /etc/apache2/sites-available/
- ARG FRESHRSS_VERSION
- ARG SOURCE_COMMIT
- LABEL \
- org.opencontainers.image.description="A self-hosted RSS feed aggregator" \
- org.opencontainers.image.documentation="https://freshrss.github.io/FreshRSS/" \
- org.opencontainers.image.licenses="AGPL-3.0" \
- org.opencontainers.image.revision="${SOURCE_COMMIT}" \
- org.opencontainers.image.source="https://github.com/FreshRSS/FreshRSS" \
- org.opencontainers.image.title="FreshRSS" \
- org.opencontainers.image.url="https://freshrss.org/" \
- org.opencontainers.image.vendor="FreshRSS" \
- org.opencontainers.image.version="$FRESHRSS_VERSION"
- RUN \
- # Disable unwanted Apache modules and configurations
- a2dismod -q -f alias autoindex negotiation status && \
- a2dismod -q auth_openidc && \
- a2disconf -q '*' && \
- a2dissite -q '*' && \
- sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" /etc/apache2/apache2.conf && \
- sed -r -i "/^\s*Listen /s/^/#/" /etc/apache2/ports.conf && \
- # Enable required Apache modules
- a2enmod -q deflate expires filter headers mime remoteip setenvif && \
- # Enable FreshRSS configuration for Apache
- a2ensite -q 'FreshRSS*' && \
- # Disable unwanted PHP modules
- phpdismod calendar exif ffi ftp gettext mysqli posix readline shmop sockets sysvmsg sysvsem sysvshm xsl && \
- # Disable built-in FreshRSS updates when using Docker, as the full image is supposed to be updated instead
- sed -r -i "\\#disable_update#s#^.*#\t'disable_update' => true,#" ./config.default.php && \
- # Configure cron job
- touch /var/www/FreshRSS/Docker/env.txt && \
- echo "7,37 * * * * . /var/www/FreshRSS/Docker/env.txt; \
- su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \
- 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" > /etc/crontab.freshrss.default
- ENV COPY_LOG_TO_SYSLOG=On
- ENV COPY_SYSLOG_TO_STDERR=On
- ENV CRON_MIN=''
- ENV DATA_PATH=''
- ENV FRESHRSS_ENV=''
- ENV LISTEN=''
- ENV OIDC_ENABLED=''
- ENV TRUSTED_PROXY=''
- ENTRYPOINT ["./Docker/entrypoint.sh"]
- EXPOSE 80
- # hadolint ignore=DL3025
- CMD ([ -z "$CRON_MIN" ] || cron) && \
- . /etc/apache2/envvars && \
- exec apache2 -D FOREGROUND $([ -n "$OIDC_ENABLED" ] && [ "$OIDC_ENABLED" -ne 0 ] && echo "-D OIDC_ENABLED")
|