docker-rainloop/Dockerfile

54 lines
2.0 KiB
Docker
Raw Normal View History

2016-07-02 09:46:21 +02:00
FROM alpine:3.4
2016-05-05 09:15:35 +02:00
MAINTAINER Wonderfall <wonderfall@mondedie.fr>
MAINTAINER Hardware <contact@meshup.net>
2016-05-13 09:20:21 +02:00
ARG GPG_rainloop="3B79 7ECE 694F 3B7B 70F3 11A4 ED7C 49D9 87DA 4591"
2016-05-05 09:15:35 +02:00
ENV GID=991 UID=991
2016-07-02 09:46:21 +02:00
RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
&& echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
2016-05-05 09:15:35 +02:00
&& apk -U add \
2016-05-13 09:20:21 +02:00
gnupg \
2016-05-05 09:15:35 +02:00
nginx \
supervisor \
tini@commuedge \
2016-05-13 09:20:21 +02:00
php7-fpm@testing \
php7-curl@testing \
php7-iconv@testing \
php7-xml@testing \
php7-dom@testing \
php7-openssl@testing \
php7-json@testing \
php7-zlib@testing \
php7-pdo_mysql@testing \
php7-pdo_sqlite@testing \
php7-sqlite3@testing \
&& cd /tmp \
&& wget -q http://repository.rainloop.net/v2/webmail/rainloop-latest.zip \
&& wget -q http://repository.rainloop.net/v2/webmail/rainloop-latest.zip.asc \
2016-05-13 09:20:21 +02:00
&& wget -q http://repository.rainloop.net/RainLoop.asc \
&& echo "Verifying authenticity of rainloop-latest.zip using GPG..." \
2016-05-13 09:20:21 +02:00
&& gpg --import RainLoop.asc \
&& FINGERPRINT="$(LANG=C gpg --verify rainloop-latest.zip.asc rainloop-latest.zip 2>&1 \
2016-05-13 09:20:21 +02:00
| sed -n "s#Primary key fingerprint: \(.*\)#\1#p")" \
&& if [ -z "${FINGERPRINT}" ]; then echo "Warning! Invalid GPG signature!" && exit 1; fi \
&& if [ "${FINGERPRINT}" != "${GPG_rainloop}" ]; then echo "Warning! Wrong GPG fingerprint!" && exit 1; fi \
&& echo "All seems good, now unzipping rainloop-latest.zip..." \
&& mkdir /rainloop && unzip -q /tmp/rainloop-latest.zip -d /rainloop \
2016-05-13 09:20:21 +02:00
&& find /rainloop -type d -exec chmod 755 {} \; \
&& find /rainloop -type f -exec chmod 644 {} \; \
2016-05-05 09:15:35 +02:00
&& apk del gnupg \
2016-07-02 09:46:21 +02:00
&& rm -rf /tmp/* /var/cache/apk/* /root/.gnupg
2016-05-05 09:15:35 +02:00
COPY nginx.conf /etc/nginx/nginx.conf
2016-05-13 09:20:21 +02:00
COPY php-fpm.conf /etc/php7/php-fpm.conf
2016-05-05 09:15:35 +02:00
COPY supervisord.conf /etc/supervisor/supervisord.conf
COPY startup /usr/local/bin/startup
RUN chmod +x /usr/local/bin/startup
VOLUME /rainloop/data
EXPOSE 80
2016-07-02 09:46:21 +02:00
CMD ["/sbin/tini","--","startup"]