From d6c42b16e001550014972056728c9d0fbebf37f1 Mon Sep 17 00:00:00 2001 From: Hardware Date: Thu, 3 May 2018 23:04:47 +0200 Subject: [PATCH] update(): postfixadmin 3.2 --- Dockerfile | 6 +++++- README.md | 9 +++++---- bin/run.sh | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index c7c6645..2ce1faa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,12 +3,13 @@ FROM alpine:3.7 LABEL description "PostfixAdmin is a web based interface used to manage mailboxes" \ maintainer="Hardware " -ARG VERSION=3.1 +ARG VERSION=3.2 # https://pgp.mit.edu/pks/lookup?search=0xC6A682EA63C82F1C&fingerprint=on&op=index # pub 4096R/63C82F1C 2005-10-06 Christian Boltz (www.cboltz.de) ARG GPG_SHORTID="0xC6A682EA63C82F1C" ARG GPG_FINGERPRINT="70CA A060 DE04 2AAE B1B1 5196 C6A6 82EA 63C8 2F1C" +ARG SHA256_HASH="866d4c0ca870b2cac184e5837a4d201af8fcefecef09bc2c887a6e017a00cefe" RUN echo "@community https://nl.alpinelinux.org/alpine/v3.7/community" >> /etc/apk/repositories \ && apk -U upgrade \ @@ -20,6 +21,7 @@ RUN echo "@community https://nl.alpinelinux.org/alpine/v3.7/community" >> /etc/a dovecot \ tini@community \ php7@community \ + php7-phar \ php7-fpm@community \ php7-imap@community \ php7-pgsql@community \ @@ -35,6 +37,8 @@ RUN echo "@community https://nl.alpinelinux.org/alpine/v3.7/community" >> /etc/a gpg --keyserver keyserver.pgp.com --recv-keys ${GPG_SHORTID} || \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys ${GPG_SHORTID} \ ) \ + && CHECKSUM=$(sha256sum ${PFA_TARBALL} | awk '{print $1}') \ + && if [ "${CHECKSUM}" != "${SHA256_HASH}" ]; then echo "ERROR: Checksum does not match!" && exit 1; fi \ && FINGERPRINT="$(LANG=C gpg --verify ${PFA_TARBALL}.asc ${PFA_TARBALL} 2>&1 | sed -n "s#Primary key fingerprint: \(.*\)#\1#p")" \ && if [ -z "${FINGERPRINT}" ]; then echo "ERROR: Invalid GPG signature!" && exit 1; fi \ && if [ "${FINGERPRINT}" != "${GPG_FINGERPRINT}" ]; then echo "ERROR: Wrong GPG fingerprint!" && exit 1; fi \ diff --git a/README.md b/README.md index 1d3cf8a..850a814 100644 --- a/README.md +++ b/README.md @@ -10,15 +10,16 @@ PostfixAdmin is a web based interface used to manage mailboxes, virtual domains - Lightweight & secure image (no root process) - Based on Alpine Linux -- Latest Postfixadmin version (3.1) +- Latest Postfixadmin version (3.2) - MariaDB/PostgreSQL driver - With PHP7 ### Built-time variables -- **VERSION** : version of postfixadmin (default: **3.1**) +- **VERSION** : version of postfixadmin - **GPG_SHORTID** : short gpg key ID - **GPG_FINGERPRINT** : fingerprint of signing key +- **SHA256_HASH** : SHA256 hash of Postfixadmin archive ### Ports @@ -30,9 +31,9 @@ PostfixAdmin is a web based interface used to manage mailboxes, virtual domains | -------- | ----------- | ---- | ------------- | | **UID** | postfixadmin user id | *optional* | 991 | **GID** | postfixadmin group id | *optional* | 991 -| **DBDRIVER** | Database type: mysql, pgsql | optional | mysql +| **DBDRIVER** | Database type: mysql, pgsql | *optional* | mysql | **DBHOST** | Database instance ip/hostname | *optional* | mariadb -| **DBPORT** | Database instance port **DOES NOT WORK ON MYSQL FOR NOW** | optional | 3306 +| **DBPORT** | Database instance port | *optional* | 3306 | **DBUSER** | Database database username | *optional* | postfix | **DBNAME** | Database database name | *optional* | postfix | **DBPASS** | Database database password or location of a file containing it | **required** | null diff --git a/bin/run.sh b/bin/run.sh index 04e380a..65cf63a 100644 --- a/bin/run.sh +++ b/bin/run.sh @@ -81,5 +81,6 @@ cat > /postfixadmin/config.local.php < EOF + # RUN ! -exec su-exec $UID:$GID php7 -S 0.0.0.0:8888 -t /postfixadmin +exec su-exec $UID:$GID php7 -S 0.0.0.0:8888 -t /postfixadmin/public