freshrss-app/Dockerfile

56 lines
2.1 KiB
Docker
Raw Permalink Normal View History

2017-02-18 10:51:44 +00:00
FROM cloudron/base:0.10.0
2017-02-17 08:45:48 +00:00
MAINTAINER Rainloop Developers <support@cloudron.io>
EXPOSE 8000
RUN apt-get update \
&& apt-get -y install php php-curl php-gmp php-intl php-mbstring php-xml php-zip \
libapache2-mod-php mysql-client php-mysql
2017-06-03 22:30:23 +00:00
ENV VERSION 1.7.0
ENV EXTENSIONS_VERSION b2e9d7efceb67427afaea4130cb409c9bdbe440a
2017-02-17 08:45:48 +00:00
RUN mkdir -p /app/code
WORKDIR /app/code
RUN wget "https://github.com/FreshRSS/FreshRSS/archive/${VERSION}.tar.gz" -O - \
| tar -xz --strip-components=1
RUN mkdir -p /app/data \
&& mv data data-orig \
&& ln -s /app/data data
2017-02-18 13:26:35 +00:00
ADD change-ttrss-file-path.patch /app/code/change-ttrss-file-path.patch
RUN wget https://github.com/FreshRSS/Extensions/archive/${EXTENSIONS_VERSION}.tar.gz -O - \
| tar -xz --strip-components=1 -C /app/code/extensions \
2017-02-23 14:54:34 +00:00
&& patch -p0 -d /app/code < /app/code/change-ttrss-file-path.patch \
2017-02-18 13:26:35 +00:00
&& mv /app/code/extensions /app/code/extensions-orig \
&& ln -s /app/data/extensions /app/code/extensions \
&& ln -s /app/data/extensions/ttrss.php /app/code/p/api/ttrss.php
2017-02-18 10:51:44 +00:00
2017-02-17 08:45:48 +00:00
ADD apache2.conf /etc/apache2/sites-available/freshrss.conf
RUN rm /etc/apache2/sites-enabled/* \
&& sed -e 's,^ErrorLog.*,ErrorLog "/dev/stderr",' -i /etc/apache2/apache2.conf \
&& sed -e "s,MaxSpareServers[^:].*,MaxSpareServers 5," -i /etc/apache2/mods-available/mpm_prefork.conf \
&& a2disconf other-vhosts-access-log \
&& echo "Listen 8000" > /etc/apache2/ports.conf \
&& a2enmod headers expires \
&& a2ensite freshrss
2017-02-17 10:28:42 +00:00
RUN rm -rf /var/lib/php \
&& ln -s /run/php /var/lib/php \
&& mkdir -p /run/php/session
RUN crudini --set /etc/php/7.0/apache2/php.ini PHP upload_max_filesize 64M && \
crudini --set /etc/php/7.0/apache2/php.ini PHP post_max_size 64M && \
crudini --set /etc/php/7.0/apache2/php.ini PHP memory_limit 64M && \
crudini --set /etc/php/7.0/apache2/php.ini Session session.save_path /run/php/session && \
crudini --set /etc/php/7.0/apache2/php.ini Session session.gc_probability 1 && \
crudini --set /etc/php/7.0/apache2/php.ini Session session.gc_divisor 100
2017-02-17 10:28:42 +00:00
2017-02-17 08:45:48 +00:00
ADD start.sh /app/code/start.sh
CMD [ "/app/code/start.sh" ]