Skip to content

Commit

Permalink
Update Base Image, PHP and Rainloop Version (#6)
Browse files Browse the repository at this point in the history
-Alpine 3.17
-PHP 8.1
-Rainloop 1.17.0
  • Loading branch information
merzi authored Dec 14, 2022
1 parent 9267e93 commit de2a2c4
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 25 deletions.
41 changes: 22 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion rootfs/services/php/run
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
exec php-fpm7
exec php-fpm81
6 changes: 3 additions & 3 deletions rootfs/usr/local/bin/run.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/sh

# Set attachment size limit
sed -i "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /etc/php7/php-fpm.conf /etc/nginx/nginx.conf
sed -i "s/<MEMORY_LIMIT>/$MEMORY_LIMIT/g" /etc/php7/php-fpm.conf
sed -i "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /etc/php81/php-fpm.conf /etc/nginx/nginx.conf
sed -i "s/<MEMORY_LIMIT>/$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
Expand All @@ -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
Expand Down

0 comments on commit de2a2c4

Please sign in to comment.