35 lines
1.4 KiB
Docker
35 lines
1.4 KiB
Docker
FROM wonderfall/nginx-php:7.1
|
|
|
|
LABEL description "Rainloop is a simple, modern & fast web-based client" \
|
|
maintainer="Hardware <contact@meshup.net>"
|
|
|
|
ARG GPG_FINGERPRINT="3B79 7ECE 694F 3B7B 70F3 11A4 ED7C 49D9 87DA 4591"
|
|
|
|
ENV UID=991 GID=991 UPLOAD_MAX_SIZE=25M MEMORY_LIMIT=128M
|
|
|
|
RUN apk -U upgrade \
|
|
&& apk add -t build-dependencies \
|
|
gnupg \
|
|
openssl \
|
|
wget \
|
|
&& cd /tmp \
|
|
&& wget -q https://www.rainloop.net/repository/webmail/rainloop-community-latest.zip \
|
|
&& wget -q https://www.rainloop.net/repository/webmail/rainloop-community-latest.zip.asc \
|
|
&& wget -q https://www.rainloop.net/repository/RainLoop.asc \
|
|
&& gpg --import RainLoop.asc \
|
|
&& FINGERPRINT="$(LANG=C gpg --verify rainloop-community-latest.zip.asc rainloop-community-latest.zip 2>&1 \
|
|
| sed -n "s#Primary key fingerprint: \(.*\)#\1#p")" \
|
|
&& if [ -z "${FINGERPRINT}" ]; then echo "Warning! Invalid GPG signature!" && exit 1; fi \
|
|
&& if [ "${FINGERPRINT}" != "${GPG_FINGERPRINT}" ]; then echo "Warning! Wrong GPG fingerprint!" && exit 1; fi \
|
|
&& mkdir /rainloop && unzip -q /tmp/rainloop-community-latest.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/* /etc/s6.d/*/* /etc/s6.d/.s6-svscan/*
|
|
VOLUME /rainloop/data
|
|
EXPOSE 8888
|
|
CMD ["run.sh"]
|