1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-14 10:53:30 +02:00
Mailu/webmails/rainloop/Dockerfile

77 lines
2.2 KiB
Docker
Raw Normal View History

2021-08-12 17:23:24 +02:00
ARG ARCH=""
# NOTE: only add file if building for arm
FROM ${ARCH}alpine:3.14
ARG VERSION
2021-08-12 17:23:24 +02:00
ONBUILD COPY --from=balenalib/rpi-alpine:3.14 /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
2021-11-04 15:22:12 +02:00
ENV TZ Etc/UTC
LABEL version=$VERSION
# 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 \
&& pip3 install socrate==0.2.0
# 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 \
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
# nginx / PHP config files
2021-08-12 17:23:24 +02:00
COPY config/nginx-rainloop.conf /etc/nginx/http.d/rainloop.conf
COPY config/php-rainloop.conf /etc/php7/php-fpm.d/rainloop.conf
# Rainloop login
COPY login/include.php /var/www/rainloop/include.php
COPY login/sso.php /var/www/rainloop/sso.php
# 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
RUN apk add --no-cache \
2021-08-12 17:23:24 +02:00
curl unzip \
&& cd /var/www/rainloop \
&& curl -L -O ${RAINLOOP_URL} \
2018-10-11 03:18:35 +02:00
&& unzip -q *.zip \
&& rm -f *.zip \
&& rm -rf data/ \
&& find . -type d -exec chmod 755 {} \; \
&& find . -type f -exec chmod 644 {} \; \
&& chown -R nginx:nginx /var/www/rainloop \
2021-08-16 17:41:36 +02:00
&& apk del unzip
COPY start.py /start.py
EXPOSE 80/tcp
VOLUME ["/data"]
CMD php-fpm7 && /start.py
HEALTHCHECK CMD curl -f -L http://localhost/ || exit 1
RUN echo $VERSION >> /version