From f2259c3302ccafe17dc9e8f39ce177ffd19a2b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20S=C3=A4nger?= Date: Thu, 11 Oct 2018 03:18:35 +0200 Subject: [PATCH] reduce webmail image-layers/sizes --- webmails/rainloop/Dockerfile | 13 +++++++------ webmails/roundcube/Dockerfile | 15 +++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/webmails/rainloop/Dockerfile b/webmails/rainloop/Dockerfile index 2da4e672..889c8486 100644 --- a/webmails/rainloop/Dockerfile +++ b/webmails/rainloop/Dockerfile @@ -1,20 +1,21 @@ FROM php:7.2-apache -RUN apt-get update && apt-get install -y \ - unzip python3 python3-jinja2 - ENV RAINLOOP_URL https://github.com/RainLoop/rainloop-webmail/releases/download/v1.12.1/rainloop-community-1.12.1.zip -RUN rm -rf /var/www/html/ \ +RUN apt-get update && apt-get install -y \ + unzip python3 python3-jinja2 \ + && rm -rf /var/www/html/ \ && mkdir /var/www/html \ && cd /var/www/html \ && curl -L -O ${RAINLOOP_URL} \ - && unzip *.zip \ + && unzip -q *.zip \ && rm -f *.zip \ && rm -rf data/ \ && find . -type d -exec chmod 755 {} \; \ && find . -type f -exec chmod 644 {} \; \ - && chown -R www-data: * + && chown -R www-data: * \ + && apt-get purge -y unzip \ + && rm -rf /var/lib/apt/lists COPY include.php /var/www/html/include.php COPY php.ini /usr/local/etc/php/conf.d/rainloop.ini diff --git a/webmails/roundcube/Dockerfile b/webmails/roundcube/Dockerfile index ad198236..50a58a4f 100644 --- a/webmails/roundcube/Dockerfile +++ b/webmails/roundcube/Dockerfile @@ -1,14 +1,12 @@ FROM php:7.2-apache -RUN apt-get update && apt-get install -y \ - zlib1g-dev \ - && docker-php-ext-install zip - ENV ROUNDCUBE_URL https://github.com/roundcube/roundcubemail/releases/download/1.3.7/roundcubemail-1.3.7-complete.tar.gz -RUN echo date.timezone=UTC > /usr/local/etc/php/conf.d/timezone.ini - -RUN rm -rf /var/www/html/ \ +RUN apt-get update && apt-get install -y \ + zlib1g-dev \ + && docker-php-ext-install zip \ + && echo date.timezone=UTC > /usr/local/etc/php/conf.d/timezone.ini \ + && rm -rf /var/www/html/ \ && cd /var/www \ && curl -L -O ${ROUNDCUBE_URL} \ && tar -xf *.tar.gz \ @@ -17,7 +15,8 @@ RUN rm -rf /var/www/html/ \ && cd html \ && rm -rf CHANGELOG INSTALL LICENSE README.md UPGRADING composer.json-dist installer \ && sed -i 's,mod_php5.c,mod_php7.c,g' .htaccess \ - && chown -R www-data: logs temp + && chown -R www-data: logs temp \ + && rm -rf /var/lib/apt/lists COPY php.ini /usr/local/etc/php/conf.d/roundcube.ini