57 lines
1.9 KiB
Docker
57 lines
1.9 KiB
Docker
FROM alpine:latest
|
|
|
|
LABEL description "Snappymail is a simple, modern & fast web-based client based on Rainloop"
|
|
|
|
ARG GPG_FINGERPRINT="1016 E470 7914 5542 F8BA 1335 4820 8BA1 3290 F3EB"
|
|
ARG RAINLOOP_VERSION=2.29.1
|
|
|
|
ENV UID=991 GID=991 UPLOAD_MAX_SIZE=25M LOG_TO_STDOUT=false MEMORY_LIMIT=128M
|
|
|
|
RUN apk -U upgrade \
|
|
&& apk add -t build-dependencies \
|
|
gnupg \
|
|
openssl \
|
|
wget \
|
|
&& apk add \
|
|
ca-certificates \
|
|
nginx \
|
|
s6 \
|
|
su-exec \
|
|
php-fpm \
|
|
php-curl \
|
|
php-iconv \
|
|
php-xml \
|
|
php-dom \
|
|
php-openssl \
|
|
php-json \
|
|
php-zlib \
|
|
php-pdo_pgsql \
|
|
php-pdo_mysql \
|
|
php-pdo_sqlite \
|
|
php-sqlite3 \
|
|
php-ldap \
|
|
php-mbstring \
|
|
php-ctype \
|
|
php-simplexml
|
|
WORKDIR /tmp
|
|
RUN set -ex ; \
|
|
wget -q https://github.com/the-djmaze/snappymail/releases/download/v${RAINLOOP_VERSION}/snappymail-${RAINLOOP_VERSION}.zip ; \
|
|
wget -q https://github.com/the-djmaze/snappymail/releases/download/v${RAINLOOP_VERSION}/snappymail-${RAINLOOP_VERSION}.zip.asc ; \
|
|
wget -q https://snappymail.eu/repository/deb/48208BA13290F3EB.asc ; \
|
|
gpg --import 48208BA13290F3EB.asc ; \
|
|
FINGERPRINT="$(LANG=C gpg --verify snappymail-${RAINLOOP_VERSION}.zip.asc snappymail-${RAINLOOP_VERSION}.zip 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 ; \
|
|
mkdir /rainloop; \
|
|
unzip -q /tmp/snappymail-${RAINLOOP_VERSION}.zip -d /rainloop ; \
|
|
find /rainloop -type d -exec chmod 755 {} \; ; \
|
|
find /rainloop -type f -exec chmod 644 {} \; ; \
|
|
apk del build-dependencies ; \
|
|
rm -rf /tmp/* /var/cache/apk/* /root/.gnupg
|
|
|
|
COPY rootfs /
|
|
RUN chmod +x /usr/local/bin/run.sh /services/*/run /services/.s6-svscan/*
|
|
VOLUME /rainloop/data
|
|
EXPOSE 8888
|
|
CMD ["run.sh"]
|