docker-rainloop/Dockerfile

58 lines
1.9 KiB
Docker
Raw Normal View History

FROM alpine:latest
2017-03-12 18:15:04 +01:00
2023-10-19 08:47:55 +01:00
LABEL description "Snappymail is a simple, modern & fast web-based client based on Rainloop"
2016-05-05 09:15:35 +02:00
2023-10-19 08:47:55 +01:00
ARG GPG_FINGERPRINT="1016 E470 7914 5542 F8BA 1335 4820 8BA1 3290 F3EB"
2024-06-12 07:32:16 +01:00
ARG RAINLOOP_VERSION=2.36.3
2016-05-13 09:20:21 +02:00
2018-06-25 20:34:30 +02:00
ENV UID=991 GID=991 UPLOAD_MAX_SIZE=25M LOG_TO_STDOUT=false MEMORY_LIMIT=128M
2016-05-05 09:15:35 +02:00
RUN apk -U upgrade \
2017-06-04 09:36:03 +02:00
&& apk add -t build-dependencies \
2016-05-13 09:20:21 +02:00
gnupg \
2017-03-17 09:00:13 +01:00
openssl \
2017-06-04 09:36:03 +02:00
wget \
2018-01-13 14:57:15 +01:00
&& apk add \
ca-certificates \
nginx \
s6 \
su-exec \
2023-02-04 17:32:12 +00:00
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 \
2023-10-19 08:47:55 +01:00
php-mbstring \
php-ctype \
2024-02-27 14:23:40 +00:00
php-fileinfo \
2023-02-04 17:32:12 +00:00
php-simplexml
WORKDIR /tmp
RUN set -ex ; \
2023-10-19 08:47:55 +01:00
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; \
2023-10-19 08:47:55 +01:00
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
2016-05-05 09:15:35 +02:00
2017-08-27 16:31:04 +02:00
COPY rootfs /
2018-01-13 14:57:15 +01:00
RUN chmod +x /usr/local/bin/run.sh /services/*/run /services/.s6-svscan/*
2016-05-05 09:15:35 +02:00
VOLUME /rainloop/data
2016-09-24 12:46:58 +02:00
EXPOSE 8888
CMD ["run.sh"]