2020-09-12 08:16:24 +00:00
|
|
|
FROM debian:buster-20200908-slim
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
ENV TZ UTC
|
|
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
|
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
|
|
|
|
|
|
RUN apt-get update -qq && \
|
|
|
|
apt-get install --no-install-recommends -qqy \
|
|
|
|
ca-certificates cron \
|
|
|
|
apache2 libapache2-mod-php \
|
|
|
|
php-curl php-gmp php-intl php-mbstring php-xml php-zip \
|
2020-09-12 08:46:11 +00:00
|
|
|
php-sqlite3 php-mysql php-pgsql wget && \
|
2020-09-12 08:16:24 +00:00
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
RUN mkdir -p /var/www/ /run/apache2/
|
|
|
|
|
|
|
|
ARG VERSION
|
|
|
|
ARG SRC=https://github.com/FreshRSS/FreshRSS/archive/${VERSION}.tar.gz
|
2020-09-12 11:01:25 +00:00
|
|
|
RUN wget ${SRC} && tar -xf ${VERSION}.tar.gz && rm ${VERSION}.tar.gz && \
|
2020-09-12 08:16:24 +00:00
|
|
|
mv FreshRSS-${VERSION} /var/www/FreshRSS && \
|
|
|
|
mv /var/www/FreshRSS/Docker/FreshRSS.Apache.conf /etc/apache2/sites-available/ && \
|
|
|
|
sed -i "s/\:80/\:8080/" /etc/apache2/sites-available/FreshRSS.Apache.conf && \
|
2020-09-12 11:01:25 +00:00
|
|
|
sed -i "s/OS/Prod/" /etc/apache2/sites-available/FreshRSS.Apache.conf
|
|
|
|
|
2020-09-12 08:46:11 +00:00
|
|
|
ADD entrypoint.sh /usr/local/bin/entrypoint.sh
|
2020-09-12 08:16:24 +00:00
|
|
|
|
|
|
|
RUN a2dismod -f alias autoindex negotiation status && \
|
|
|
|
a2enmod deflate expires headers mime setenvif && \
|
|
|
|
a2disconf '*' && \
|
|
|
|
a2dissite '*' && \
|
|
|
|
a2ensite 'FreshRSS*'
|
|
|
|
|
|
|
|
RUN sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" /etc/apache2/apache2.conf && \
|
|
|
|
sed -r -i "/^\s*Listen /s/^/#/" /etc/apache2/ports.conf && \
|
2020-09-12 19:57:05 +00:00
|
|
|
sed -r -i "/^\s*User /s/^/#/" /etc/apache2/apache2.conf && \
|
|
|
|
sed -r -i "/^\s*Group /s/^/#/" /etc/apache2/apache2.conf && \
|
2020-09-12 08:46:11 +00:00
|
|
|
touch /var/www/FreshRSS/Docker/env.txt
|
|
|
|
|
2020-09-12 08:16:24 +00:00
|
|
|
WORKDIR /var/www/FreshRSS
|
|
|
|
RUN chown -R :www-data . && \
|
|
|
|
chmod -R g+r . && chmod -R g+w ./data/ && \
|
|
|
|
find /etc/php*/ -name php.ini -exec sed -r -i "\\#^;?date.timezone#s#^.*#date.timezone = $TZ#" {} \; && \
|
|
|
|
find /etc/php*/ -name php.ini -exec sed -r -i "\\#^;?post_max_size#s#^.*#post_max_size = 32M#" {} \; && \
|
|
|
|
find /etc/php*/ -name php.ini -exec sed -r -i "\\#^;?upload_max_filesize#s#^.*#upload_max_filesize = 32M#" {} \;
|
|
|
|
|
|
|
|
ENV COPY_LOG_TO_SYSLOG On
|
|
|
|
ENV COPY_SYSLOG_TO_STDERR On
|
|
|
|
ENV CRON_MIN ''
|
|
|
|
ENV FRESHRSS_ENV ''
|
|
|
|
|
|
|
|
# UID of www-data
|
|
|
|
USER 33
|
2020-09-12 08:46:11 +00:00
|
|
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
2020-09-12 08:16:24 +00:00
|
|
|
|
|
|
|
EXPOSE 8080
|
|
|
|
CMD ([ -z "$CRON_MIN" ] || cron) && \
|
|
|
|
. /etc/apache2/envvars && \
|
|
|
|
exec apache2 -D FOREGROUND
|