freshrss-app/Dockerfile

43 lines
1.7 KiB
Docker

FROM cloudron/base:1.0.0@sha256:147a648a068a2e746644746bbfb42eb7a50d682437cead3c67c933c546357617
RUN mkdir -p /app/code
WORKDIR /app/code
RUN curl -L https://github.com/FreshRSS/FreshRSS/archive/1.14.0.tar.gz | tar -zxvf - --strip-components=1
RUN mv data data-orig && ln -s /app/data data
# official extensions
RUN wget https://github.com/FreshRSS/Extensions/archive/d7f025d9dd4d6322a18783db3c0cec4f8b1cc291.tar.gz -O - | tar -xz --strip-components=1 -C /app/code/extensions && \
mv /app/code/extensions /app/code/extensions-orig && \
ln -s /app/data/extensions /app/code/extensions
# https://github.com/FreshRSS/FreshRSS/issues/2233
RUN sed -e "s/SetEnvIf/SetEnvIfNoCase/" -i /app/code/p/api/.htaccess
# configure apache
RUN rm /etc/apache2/sites-enabled/*
RUN sed -e 's,^ErrorLog.*,ErrorLog "|/bin/cat",' -i /etc/apache2/apache2.conf
COPY apache/mpm_prefork.conf /etc/apache2/mods-available/mpm_prefork.conf
RUN a2disconf other-vhosts-access-log
ADD apache/freshrss.conf /etc/apache2/sites-enabled/freshrss.conf
RUN echo "Listen 8000" > /etc/apache2/ports.conf
RUN a2enmod headers expires deflate mime dir rewrite setenvif
RUN rm -rf /var/lib/php \
&& ln -s /run/php /var/lib/php \
&& mkdir -p /run/php/session
RUN crudini --set /etc/php/7.2/apache2/php.ini PHP upload_max_filesize 64M && \
crudini --set /etc/php/7.2/apache2/php.ini PHP post_max_size 64M && \
crudini --set /etc/php/7.2/apache2/php.ini PHP memory_limit 64M && \
crudini --set /etc/php/7.2/apache2/php.ini Session session.save_path /run/php/session && \
crudini --set /etc/php/7.2/apache2/php.ini Session session.gc_probability 1 && \
crudini --set /etc/php/7.2/apache2/php.ini Session session.gc_divisor 100
ADD start.sh /app/code/start.sh
CMD [ "/app/code/start.sh" ]