2019-08-23 21:24:21 +02:00
|
|
|
ARG ARCH=""
|
|
|
|
ARG QEMU=other
|
|
|
|
|
|
|
|
# NOTE: only add file if building for arm
|
|
|
|
FROM ${ARCH}php:7.3-apache as build_arm
|
|
|
|
ONBUILD COPY --from=balenalib/rpi-alpine:3.10 /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
|
|
|
|
|
|
|
|
FROM ${ARCH}php:7.3-apache as build_other
|
|
|
|
|
|
|
|
FROM build_${QEMU}
|
2018-10-31 19:17:23 +02:00
|
|
|
#Shared layer between rainloop and roundcube
|
|
|
|
RUN apt-get update && apt-get install -y \
|
2019-01-24 16:14:33 +02:00
|
|
|
python3 curl python3-pip git \
|
2018-12-21 19:00:01 +02:00
|
|
|
&& rm -rf /var/lib/apt/lists \
|
|
|
|
&& echo "ServerSignature Off" >> /etc/apache2/apache2.conf
|
2016-09-03 14:10:42 +02:00
|
|
|
|
2019-07-25 10:33:57 +02:00
|
|
|
# Shared layer between nginx, dovecot, postfix, postgresql, rspamd, unbound, rainloop, roundcube
|
|
|
|
RUN pip3 install socrate
|
|
|
|
|
2019-07-12 09:16:51 +02:00
|
|
|
ENV RAINLOOP_URL https://github.com/RainLoop/rainloop-webmail/releases/download/v1.13.0/rainloop-community-1.13.0.zip
|
2016-09-03 14:10:42 +02:00
|
|
|
|
2018-10-11 03:18:35 +02:00
|
|
|
RUN apt-get update && apt-get install -y \
|
2018-10-31 19:17:23 +02:00
|
|
|
unzip python3-jinja2 \
|
2018-10-11 03:18:35 +02:00
|
|
|
&& rm -rf /var/www/html/ \
|
2017-09-17 19:19:28 +02:00
|
|
|
&& mkdir /var/www/html \
|
|
|
|
&& cd /var/www/html \
|
2016-09-03 14:10:42 +02:00
|
|
|
&& curl -L -O ${RAINLOOP_URL} \
|
2018-10-11 03:18:35 +02:00
|
|
|
&& unzip -q *.zip \
|
2016-09-03 14:10:42 +02:00
|
|
|
&& rm -f *.zip \
|
|
|
|
&& rm -rf data/ \
|
|
|
|
&& find . -type d -exec chmod 755 {} \; \
|
|
|
|
&& find . -type f -exec chmod 644 {} \; \
|
2018-10-11 03:18:35 +02:00
|
|
|
&& chown -R www-data: * \
|
|
|
|
&& apt-get purge -y unzip \
|
|
|
|
&& rm -rf /var/lib/apt/lists
|
2019-07-14 11:33:54 +02:00
|
|
|
|
2017-09-17 19:19:28 +02:00
|
|
|
COPY include.php /var/www/html/include.php
|
2018-12-07 13:37:40 +02:00
|
|
|
COPY php.ini /php.ini
|
2016-09-03 14:10:42 +02:00
|
|
|
|
2019-02-22 15:01:06 +02:00
|
|
|
COPY application.ini /application.ini
|
2016-09-03 14:10:42 +02:00
|
|
|
COPY default.ini /default.ini
|
|
|
|
|
2018-06-04 21:41:18 +02:00
|
|
|
COPY start.py /start.py
|
2016-09-03 14:10:42 +02:00
|
|
|
|
2018-09-28 17:12:50 +02:00
|
|
|
EXPOSE 80/tcp
|
|
|
|
VOLUME ["/data"]
|
|
|
|
|
2018-06-04 21:41:18 +02:00
|
|
|
CMD /start.py
|
2018-10-16 21:38:12 +02:00
|
|
|
|
|
|
|
HEALTHCHECK CMD curl -f -L http://localhost/ || exit 1
|