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