From de2a2c442391f98448bb6d541dafc39b218c54e0 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 14 Dec 2022 20:43:53 +0100 Subject: [PATCH] Update Base Image, PHP and Rainloop Version (#6) -Alpine 3.17 -PHP 8.1 -Rainloop 1.17.0 --- Dockerfile | 41 +++++++++++++------------ README.md | 4 +-- rootfs/etc/{php7 => php81}/php-fpm.conf | 0 rootfs/services/php/run | 2 +- rootfs/usr/local/bin/run.sh | 6 ++-- 5 files changed, 28 insertions(+), 25 deletions(-) rename rootfs/etc/{php7 => php81}/php-fpm.conf (100%) diff --git a/Dockerfile b/Dockerfile index 44f3bd3..c659201 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,16 @@ -FROM alpine:3.14 +FROM alpine:3.17 LABEL description "Rainloop is a simple, modern & fast web-based client" -ARG RAINLOOP_VER=1.16.0 +ARG RAINLOOP_VER=1.17.0 + +ARG PHP_VERSION=81 ARG GPG_FINGERPRINT="3B79 7ECE 694F 3B7B 70F3 11A4 ED7C 49D9 87DA 4591" ENV UID=991 GID=991 UPLOAD_MAX_SIZE=25M LOG_TO_STDOUT=false MEMORY_LIMIT=128M -RUN echo "@community https://nl.alpinelinux.org/alpine/v3.13/community" >> /etc/apk/repositories \ - && apk -U upgrade \ +RUN apk update && apk -U upgrade \ && apk add -t build-dependencies \ gnupg \ openssl \ @@ -19,22 +20,24 @@ RUN echo "@community https://nl.alpinelinux.org/alpine/v3.13/community" >> /etc/ nginx \ s6 \ su-exec \ - php7-fpm@community \ - php7-curl@community \ - php7-iconv@community \ - php7-xml@community \ - php7-dom@community \ - php7-openssl@community \ - php7-json@community \ - php7-zlib@community \ - php7-pdo_pgsql@community \ - php7-pdo_mysql@community \ - php7-pdo_sqlite@community \ - php7-sqlite3@community \ - php7-ldap@community \ - php7-simplexml@community \ + php${PHP_VERSION}-fpm \ + php${PHP_VERSION}-curl \ + php${PHP_VERSION}-iconv \ + php${PHP_VERSION}-xml \ + php${PHP_VERSION}-dom \ + php${PHP_VERSION}-openssl \ + php${PHP_VERSION}-json \ + php${PHP_VERSION}-zlib \ + php${PHP_VERSION}-pdo_pgsql \ + php${PHP_VERSION}-pdo_mysql \ + php${PHP_VERSION}-pdo_sqlite \ + php${PHP_VERSION}-sqlite3 \ + php${PHP_VERSION}-ldap \ + php${PHP_VERSION}-simplexml \ && cd /tmp \ - && RAINLOOP_ZIP="rainloop-community-${RAINLOOP_VER}.zip" \ + && RAINLOOP_ZIP="rainloop-legacy-${RAINLOOP_VER}.zip" \ + && echo "https://github.com/RainLoop/rainloop-webmail/releases/download/v${RAINLOOP_VER}/${RAINLOOP_ZIP}" \ + && echo "https://github.com/RainLoop/rainloop-webmail/releases/download/v${RAINLOOP_VER}/${RAINLOOP_ZIP}.asc" \ && wget -q -O rainloop-community-latest.zip https://github.com/RainLoop/rainloop-webmail/releases/download/v${RAINLOOP_VER}/${RAINLOOP_ZIP} \ && wget -q -O rainloop-community-latest.zip.asc https://github.com/RainLoop/rainloop-webmail/releases/download/v${RAINLOOP_VER}/${RAINLOOP_ZIP}.asc \ && wget -q https://www.rainloop.net/repository/RainLoop.asc \ diff --git a/README.md b/README.md index a27e642..835e600 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ Rainloop is a simple, modern & fast web-based client. More details on the [offic - Lightweight & secure image (no root process) - Based on Alpine -- Latest Rainloop **Community Edition** (stable) +- Latest Rainloop **Legacy Edition** (stable) - Contacts (DB) : sqlite, mysql or pgsql (server not built-in) -- With Nginx and PHP7 +- With Nginx and PHP8.1 - Postfixadmin-change-password plugin ### Build-time variables diff --git a/rootfs/etc/php7/php-fpm.conf b/rootfs/etc/php81/php-fpm.conf similarity index 100% rename from rootfs/etc/php7/php-fpm.conf rename to rootfs/etc/php81/php-fpm.conf diff --git a/rootfs/services/php/run b/rootfs/services/php/run index e238021..a4d0073 100644 --- a/rootfs/services/php/run +++ b/rootfs/services/php/run @@ -1,2 +1,2 @@ #!/bin/sh -exec php-fpm7 +exec php-fpm81 diff --git a/rootfs/usr/local/bin/run.sh b/rootfs/usr/local/bin/run.sh index 7cc4d0b..6621965 100644 --- a/rootfs/usr/local/bin/run.sh +++ b/rootfs/usr/local/bin/run.sh @@ -1,8 +1,8 @@ #!/bin/sh # Set attachment size limit -sed -i "s//$UPLOAD_MAX_SIZE/g" /etc/php7/php-fpm.conf /etc/nginx/nginx.conf -sed -i "s//$MEMORY_LIMIT/g" /etc/php7/php-fpm.conf +sed -i "s//$UPLOAD_MAX_SIZE/g" /etc/php81/php-fpm.conf /etc/nginx/nginx.conf +sed -i "s//$MEMORY_LIMIT/g" /etc/php81/php-fpm.conf # Remove postfixadmin-change-password plugin if exist if [ -d "/rainloop/data/_data_/_default_/plugins/postfixadmin-change-password" ]; then @@ -14,7 +14,7 @@ if [ "$LOG_TO_STDOUT" = true ]; then echo "[INFO] Logging to stdout activated" chmod o+w /dev/stdout sed -i "s/.*error_log.*$/error_log \/dev\/stdout warn;/" /etc/nginx/nginx.conf - sed -i "s/.*error_log.*$/error_log = \/dev\/stdout/" /etc/php7/php-fpm.conf + sed -i "s/.*error_log.*$/error_log = \/dev\/stdout/" /etc/php81/php-fpm.conf fi # Add postfixadmin-change-password plugin