2022-11-10 17:51:22 +02:00
|
|
|
# syntax=docker/dockerfile-upstream:1.4.3
|
2019-08-23 21:24:21 +02:00
|
|
|
|
2022-11-10 17:51:22 +02:00
|
|
|
FROM base
|
2021-11-04 15:22:12 +02:00
|
|
|
|
2022-11-10 17:51:22 +02:00
|
|
|
ARG VERSION
|
2021-11-17 22:00:04 +02:00
|
|
|
LABEL version=$VERSION
|
|
|
|
|
2022-11-12 13:25:03 +02:00
|
|
|
COPY snappymail/pubkey.asc /tmp/snappymail.asc
|
|
|
|
COPY roundcube/pubkey.asc /tmp/roundcube.asc
|
2022-12-17 16:24:30 +02:00
|
|
|
COPY roundcube/roundcube.diff /tmp/roundcube.diff
|
2022-11-12 13:25:03 +02:00
|
|
|
|
2023-12-20 13:53:59 +02:00
|
|
|
# php83-pecl-imagick php83-pecl-uuid are missing
|
2022-11-11 10:10:45 +02:00
|
|
|
RUN set -euxo pipefail \
|
|
|
|
; apk add --no-cache \
|
2022-12-17 16:24:30 +02:00
|
|
|
nginx gpg gpg-agent patch \
|
2023-12-20 13:53:59 +02:00
|
|
|
php83 php83-fpm php83-mbstring php83-zip php83-xml php83-simplexml php83-pecl-apcu \
|
|
|
|
php83-dom php83-curl php83-exif gd php83-gd php83-iconv php83-intl php83-openssl php83-ctype \
|
|
|
|
php83-pdo_sqlite php83-pdo_mysql php83-pdo_pgsql php83-pdo php83-sodium libsodium php83-tidy \
|
|
|
|
php83-pspell php83-opcache php83-session php83-sockets php83-fileinfo php83-xmlreader php83-xmlwriter \
|
2022-11-12 12:40:23 +02:00
|
|
|
aspell-uk aspell-ru aspell-fr aspell-de aspell-en \
|
2022-11-11 10:10:45 +02:00
|
|
|
; rm /etc/nginx/http.d/default.conf \
|
2023-12-20 13:53:59 +02:00
|
|
|
; rm /etc/php83/php-fpm.d/www.conf \
|
|
|
|
; ln -s /usr/bin/php83 /usr/bin/php \
|
2023-10-09 11:17:53 +02:00
|
|
|
; mkdir -m 700 /root/.gnupg/ \
|
2022-11-12 13:25:03 +02:00
|
|
|
; gpg --import /tmp/snappymail.asc \
|
|
|
|
; gpg --import /tmp/roundcube.asc \
|
2023-12-20 13:53:59 +02:00
|
|
|
; echo extension=snuffleupagus > /etc/php83/conf.d/snuffleupagus.ini \
|
2022-11-24 11:00:00 +02:00
|
|
|
; rm -f /tmp/roundcube.asc /tmp/snappymail.asc \
|
|
|
|
; mkdir -p /run/nginx /conf
|
2019-07-25 10:33:57 +02:00
|
|
|
|
2022-11-12 12:34:58 +02:00
|
|
|
# roundcube
|
2023-11-06 09:56:13 +02:00
|
|
|
ENV ROUNDCUBE_URL https://github.com/roundcube/roundcubemail/releases/download/1.6.5/roundcubemail-1.6.5-complete.tar.gz
|
2023-09-16 10:35:08 +02:00
|
|
|
ENV CARDDAV_URL https://github.com/mstilkerich/rcmcarddav/releases/download/v5.1.0/carddav-v5.1.0.tar.gz
|
2019-12-26 21:29:45 +02:00
|
|
|
|
2022-11-11 10:10:45 +02:00
|
|
|
RUN set -euxo pipefail \
|
|
|
|
; cd /var/www \
|
2022-11-12 13:25:03 +02:00
|
|
|
; curl -sLo /dev/shm/roundcube.tgz ${ROUNDCUBE_URL} \
|
|
|
|
; curl -sLo /dev/shm/roundcube.tgz.asc ${ROUNDCUBE_URL}.asc \
|
2023-10-09 11:17:53 +02:00
|
|
|
; gpg --status-fd 1 --verify /dev/shm/roundcube.tgz.asc /dev/shm/roundcube.tgz \
|
2022-11-12 13:25:03 +02:00
|
|
|
; tar xzf /dev/shm/roundcube.tgz \
|
2022-11-11 10:10:45 +02:00
|
|
|
; curl -sL ${CARDDAV_URL} | tar xz \
|
2022-11-12 12:34:58 +02:00
|
|
|
; mv roundcubemail-* roundcube \
|
|
|
|
; mkdir -p /var/www/roundcube/config \
|
|
|
|
; mv carddav roundcube/plugins/ \
|
|
|
|
; cd roundcube \
|
2022-11-11 10:10:45 +02:00
|
|
|
; rm -rf CHANGELOG.md SECURITY.md INSTALL LICENSE README.md UPGRADING composer.json-dist installer composer.* \
|
2022-11-12 16:34:43 +02:00
|
|
|
; ln -sf index.php /var/www/roundcube/public_html/sso.php \
|
2022-11-18 14:25:02 +02:00
|
|
|
; rm -rf plugins/{autologon,example_addressbook,http_authentication,krb_authentication,new_user_identity,password,redundant_attachments,squirrelmail_usercopy,userinfo,virtuser_file,virtuser_query} \
|
2022-12-17 16:24:30 +02:00
|
|
|
; patch -p0 < /tmp/roundcube.diff \
|
|
|
|
; rm /tmp/roundcube.diff
|
2021-12-18 18:43:21 +02:00
|
|
|
|
2022-11-12 12:34:58 +02:00
|
|
|
COPY roundcube/config/config.inc.php /conf/
|
2022-12-20 18:24:53 +02:00
|
|
|
COPY roundcube/login/ /var/www/roundcube/plugins/mailu/
|
2022-11-12 12:34:58 +02:00
|
|
|
COPY roundcube/config/config.inc.carddav.php /var/www/roundcube/plugins/carddav/config.inc.php
|
2016-02-24 08:44:49 +02:00
|
|
|
|
2022-11-12 12:34:58 +02:00
|
|
|
# snappymail
|
2022-11-10 17:51:22 +02:00
|
|
|
|
2023-12-20 13:53:59 +02:00
|
|
|
ENV SNAPPYMAIL_URL https://github.com/the-djmaze/snappymail/releases/download/v2.31.0/snappymail-2.31.0.tar.gz
|
2022-11-12 12:34:58 +02:00
|
|
|
|
|
|
|
RUN set -euxo pipefail \
|
|
|
|
; mkdir /var/www/snappymail \
|
|
|
|
; cd /var/www/snappymail \
|
2022-11-12 13:25:03 +02:00
|
|
|
; curl -sLo /dev/shm/snappymail.tgz ${SNAPPYMAIL_URL} \
|
|
|
|
; curl -sLo /dev/shm/snappymail.tgz.asc ${SNAPPYMAIL_URL}.asc \
|
2023-10-09 11:17:53 +02:00
|
|
|
; gpg --status-fd 1 --verify /dev/shm/snappymail.tgz.asc /dev/shm/snappymail.tgz \
|
2023-10-05 20:12:48 +02:00
|
|
|
; cat /dev/shm/snappymail.tgz | tar xz
|
2022-11-12 12:34:58 +02:00
|
|
|
|
|
|
|
# SnappyMail login
|
|
|
|
COPY snappymail/login/include.php /var/www/snappymail/
|
|
|
|
COPY snappymail/login/sso.php /var/www/snappymail/
|
|
|
|
|
|
|
|
# Parsed and moved at startup
|
|
|
|
COPY snappymail/defaults/application.ini /defaults/
|
|
|
|
COPY snappymail/defaults/default.json /defaults/
|
|
|
|
|
2022-11-13 15:07:40 +02:00
|
|
|
# set perms
|
|
|
|
RUN set -euxo pipefail \
|
|
|
|
; chmod -R a+rX /var/www/snappymail \
|
|
|
|
; chown -R root:root /var/www/snappymail \
|
|
|
|
; chown -R mailu:mailu /var/www/snappymail/data \
|
|
|
|
; chown -R root:root /var/www/roundcube/ \
|
|
|
|
; chown -R mailu:mailu /var/www/roundcube/temp /var/www/roundcube/logs \
|
|
|
|
; chmod -R a+rX /var/www/roundcube
|
|
|
|
|
2022-11-12 12:34:58 +02:00
|
|
|
# common
|
2022-11-11 14:08:27 +02:00
|
|
|
COPY start.py /
|
2022-11-12 12:34:58 +02:00
|
|
|
COPY php.ini /defaults/
|
2023-12-20 13:53:59 +02:00
|
|
|
COPY php-webmail.conf /etc/php83/php-fpm.d/
|
2022-11-12 12:34:58 +02:00
|
|
|
COPY nginx-webmail.conf /conf/
|
2022-11-18 14:25:02 +02:00
|
|
|
COPY snuffleupagus.rules /etc/snuffleupagus.rules.tpl
|
2016-02-24 08:44:49 +02:00
|
|
|
|
2023-01-04 20:19:43 +02:00
|
|
|
# EXPOSE 80/tcp
|
2021-12-18 18:43:21 +02:00
|
|
|
VOLUME /data
|
|
|
|
VOLUME /overrides
|
2018-09-28 17:12:50 +02:00
|
|
|
|
2018-10-23 10:58:36 +02:00
|
|
|
CMD /start.py
|
2018-10-16 21:38:12 +02:00
|
|
|
|
2022-11-10 17:51:22 +02:00
|
|
|
HEALTHCHECK CMD curl -f -L http://localhost/ping || exit 1
|
2021-11-03 16:18:00 +02:00
|
|
|
|
2021-12-17 23:23:08 +02:00
|
|
|
RUN echo $VERSION >> /version
|