2019-08-23 21:24:21 +02:00
|
|
|
# NOTE: only add file if building for arm
|
2019-08-30 16:24:08 +02:00
|
|
|
ARG ARCH=""
|
|
|
|
ARG QEMU=other
|
2020-11-21 01:55:38 +02:00
|
|
|
FROM ${ARCH}php:7.4-apache as build_arm
|
2021-08-03 13:58:54 +02:00
|
|
|
ONBUILD COPY --from=balenalib/rpi-alpine:3.14 /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
|
2019-08-23 21:24:21 +02:00
|
|
|
|
2020-11-21 01:55:38 +02:00
|
|
|
FROM ${ARCH}php:7.4-apache as build_other
|
2019-08-23 21:24:21 +02:00
|
|
|
|
|
|
|
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-11-21 12:28:58 +02:00
|
|
|
python3 curl python3-pip git python3-multidict \
|
2018-12-21 19:00:01 +02:00
|
|
|
&& rm -rf /var/lib/apt/lists \
|
2021-09-28 12:29:57 +02:00
|
|
|
&& echo "ServerSignature Off\nServerName roundcube" >> /etc/apache2/apache2.conf \
|
|
|
|
&& sed -i 's,CustomLog.*combined$,\0 "'"expr=!(%{HTTP_USER_AGENT}=='health'\&\&(-R '127.0.0.1/8' || -R '::1'))"'",' /etc/apache2/sites-available/000-default.conf
|
2016-02-24 08:44:49 +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
|
|
|
|
|
2021-11-02 13:21:40 +02:00
|
|
|
ENV ROUNDCUBE_URL https://github.com/roundcube/roundcubemail/releases/download/1.5.0/roundcubemail-1.5.0-complete.tar.gz
|
2016-02-24 08:44:49 +02:00
|
|
|
|
2021-11-02 13:21:40 +02:00
|
|
|
ENV CARDDAV_URL https://github.com/mstilkerich/rcmcarddav/releases/download/v4.2.2/carddav-v4.2.2.tar.gz
|
2019-12-26 21:29:45 +02:00
|
|
|
|
2018-10-11 03:18:35 +02:00
|
|
|
RUN apt-get update && apt-get install -y \
|
2020-03-07 20:38:12 +02:00
|
|
|
zlib1g-dev libzip4 libzip-dev libpq-dev \
|
2019-06-24 21:18:18 +02:00
|
|
|
python3-jinja2 \
|
2020-02-04 22:35:00 +02:00
|
|
|
gpg \
|
2020-03-06 16:55:35 +02:00
|
|
|
&& docker-php-ext-install zip pdo_mysql pdo_pgsql \
|
2018-10-11 03:18:35 +02:00
|
|
|
&& echo date.timezone=UTC > /usr/local/etc/php/conf.d/timezone.ini \
|
|
|
|
&& rm -rf /var/www/html/ \
|
2017-09-17 19:19:28 +02:00
|
|
|
&& cd /var/www \
|
2021-06-30 12:36:11 +02:00
|
|
|
&& curl -sL ${ROUNDCUBE_URL} | tar xz \
|
|
|
|
&& curl -sL ${CARDDAV_URL} | tar xz \
|
2017-09-17 19:19:28 +02:00
|
|
|
&& mv roundcubemail-* html \
|
2019-12-26 21:29:45 +02:00
|
|
|
&& mv carddav html/plugins/ \
|
2017-09-17 19:19:28 +02:00
|
|
|
&& cd html \
|
2021-09-24 18:15:00 +02:00
|
|
|
&& rm -rf CHANGELOG INSTALL LICENSE README.md UPGRADING composer.json-dist installer composer.* \
|
|
|
|
&& ln -sf index.php /var/www/html/sso.php \
|
2021-09-28 11:16:40 +02:00
|
|
|
&& ln -sf /dev/stderr /var/www/html/logs/errors.log \
|
2021-09-24 18:15:00 +02:00
|
|
|
&& chown -R root:root . \
|
2021-09-28 11:16:40 +02:00
|
|
|
&& chown www-data:www-data logs temp \
|
2021-09-24 18:15:00 +02:00
|
|
|
&& chmod -R a+rX . \
|
2021-09-06 13:48:13 +02:00
|
|
|
&& rm -rf /var/lib/apt/lists \
|
2021-09-24 18:15:00 +02:00
|
|
|
&& a2enmod rewrite deflate expires headers
|
2016-02-24 08:44:49 +02:00
|
|
|
|
2018-12-07 13:37:40 +02:00
|
|
|
COPY php.ini /php.ini
|
2017-09-17 19:19:28 +02:00
|
|
|
COPY config.inc.php /var/www/html/config/
|
2021-02-06 19:14:58 +02:00
|
|
|
COPY mailu.php /var/www/html/plugins/mailu/mailu.php
|
2018-10-23 10:58:36 +02:00
|
|
|
COPY start.py /start.py
|
2016-02-24 08:44:49 +02:00
|
|
|
|
2018-09-28 17:12:50 +02:00
|
|
|
EXPOSE 80/tcp
|
|
|
|
VOLUME ["/data"]
|
|
|
|
|
2018-10-23 10:58:36 +02:00
|
|
|
CMD /start.py
|
2018-10-16 21:38:12 +02:00
|
|
|
|
2021-09-28 11:06:59 +02:00
|
|
|
HEALTHCHECK CMD curl -f -L -H 'User-Agent: health' http://localhost/ || exit 1
|