2021-08-12 17:23:24 +02:00
|
|
|
ARG ARCH=""
|
|
|
|
|
|
|
|
# NOTE: only add file if building for arm
|
|
|
|
FROM ${ARCH}alpine:3.14
|
|
|
|
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
|
|
|
|
2021-11-04 15:22:12 +02:00
|
|
|
ENV TZ Etc/UTC
|
|
|
|
|
2021-08-10 21:47:14 +02:00
|
|
|
# Shared later between dovecot postfix nginx rspamd rainloop and roundloop
|
|
|
|
RUN apk add --no-cache \
|
2021-11-02 16:32:27 +02:00
|
|
|
python3 py3-pip tzdata \
|
2021-08-10 21:47:14 +02:00
|
|
|
&& pip3 install socrate==0.2.0
|
2019-08-23 21:24:21 +02:00
|
|
|
|
2021-08-10 21:47:14 +02:00
|
|
|
# https://www.rainloop.net/docs/system-requirements/
|
|
|
|
# Rainloop:
|
|
|
|
# cURL Builtin
|
|
|
|
# iconv php7-iconv
|
|
|
|
# json php7-json
|
|
|
|
# libxml php7-xml
|
|
|
|
# dom php7-dom
|
|
|
|
# openssl php7-openssl
|
|
|
|
# DateTime Builtin
|
|
|
|
# PCRE Builtin
|
|
|
|
# SPL Builtin
|
|
|
|
# Recommended:
|
|
|
|
# php7-fpm FastCGI Process Manager
|
|
|
|
# Optional PHP extension (for contacts):
|
|
|
|
# php7-pdo Accessing databases in PHP
|
|
|
|
# php7-pdo_sqlite Access to SQLite 3 databases
|
|
|
|
RUN apk add --no-cache \
|
2021-08-12 17:23:24 +02:00
|
|
|
nginx \
|
2021-08-12 21:10:06 +02:00
|
|
|
php7 php7-fpm php7-curl php7-iconv php7-json php7-xml php7-dom php7-openssl php7-pdo php7-pdo_sqlite \
|
2021-08-12 17:23:24 +02:00
|
|
|
&& rm /etc/nginx/http.d/default.conf \
|
|
|
|
&& rm /etc/php7/php-fpm.d/www.conf \
|
|
|
|
&& mkdir -p /run/nginx \
|
|
|
|
&& mkdir -p /var/www/rainloop
|
2019-08-23 21:24:21 +02:00
|
|
|
|
2021-08-10 21:47:14 +02:00
|
|
|
# nginx / PHP config files
|
2021-08-12 17:23:24 +02:00
|
|
|
COPY config/nginx-rainloop.conf /etc/nginx/http.d/rainloop.conf
|
2021-08-10 21:47:14 +02:00
|
|
|
COPY config/php-rainloop.conf /etc/php7/php-fpm.d/rainloop.conf
|
2016-09-03 14:10:42 +02:00
|
|
|
|
2021-08-10 21:47:14 +02:00
|
|
|
# Rainloop login
|
|
|
|
COPY login/include.php /var/www/rainloop/include.php
|
|
|
|
COPY login/sso.php /var/www/rainloop/sso.php
|
2019-07-25 10:33:57 +02:00
|
|
|
|
2021-08-10 21:47:14 +02:00
|
|
|
# Parsed en moved at startup
|
|
|
|
COPY defaults/php.ini /defaults/php.ini
|
|
|
|
COPY defaults/application.ini /defaults/application.ini
|
|
|
|
COPY defaults/default.ini /defaults/default.ini
|
|
|
|
|
|
|
|
# Install Rainloop from source
|
2021-07-03 15:10:34 +02:00
|
|
|
ENV RAINLOOP_URL https://github.com/RainLoop/rainloop-webmail/releases/download/v1.16.0/rainloop-community-1.16.0.zip
|
2016-09-03 14:10:42 +02:00
|
|
|
|
2021-08-10 21:47:14 +02:00
|
|
|
RUN apk add --no-cache \
|
2021-08-12 17:23:24 +02:00
|
|
|
curl unzip \
|
2021-08-10 21:47:14 +02:00
|
|
|
&& cd /var/www/rainloop \
|
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 {} \; \
|
2021-08-10 21:47:14 +02:00
|
|
|
&& chown -R nginx:nginx /var/www/rainloop \
|
2021-08-16 17:41:36 +02:00
|
|
|
&& apk del unzip
|
2016-09-03 14:10:42 +02:00
|
|
|
|
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"]
|
|
|
|
|
2021-08-10 21:47:14 +02:00
|
|
|
CMD php-fpm7 && /start.py
|
2021-08-13 23:20:41 +02:00
|
|
|
|
|
|
|
HEALTHCHECK CMD curl -f -L http://localhost/ || exit 1
|