From 85a7b1a6ba89b960214e328aa338c1ae9334c7a3 Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Thu, 24 May 2018 13:50:27 +0200 Subject: [PATCH 1/2] Move to a debian stretch and alpine 3.7 based base image --- Dockerfile-alpine.template | 2 +- Dockerfile-debian.template | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 64996aec7..c5ddca592 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -1,4 +1,4 @@ -FROM php:%%PHP_VERSION%%-%%VARIANT%% +FROM php:%%PHP_VERSION%%-%%VARIANT%%3.7 # entrypoint.sh and cron.sh dependencies RUN set -ex; \ diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index c2c46489d..7a045f591 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -1,4 +1,4 @@ -FROM php:%%PHP_VERSION%%-%%VARIANT%% +FROM php:%%PHP_VERSION%%-%%VARIANT%%-stretch # entrypoint.sh and cron.sh dependencies RUN set -ex; \ @@ -29,7 +29,7 @@ RUN set -ex; \ libldap2-dev \ libmcrypt-dev \ libmemcached-dev \ - libpng12-dev \ + libpng-dev \ libpq-dev \ libxml2-dev \ ; \ @@ -96,6 +96,13 @@ VOLUME /var/www/html ENV NEXTCLOUD_VERSION %%VERSION%% RUN set -ex; \ + fetchDeps=" \ + gnupg \ + dirmngr \ + "; \ + apt-get update; \ + apt-get install -y --no-install-recommends $fetchDeps; \ + \ curl -fsSL -o nextcloud.tar.bz2 \ "%%BASE_DOWNLOAD_URL%%/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2"; \ curl -fsSL -o nextcloud.tar.bz2.asc \ @@ -110,7 +117,10 @@ RUN set -ex; \ rm -rf /usr/src/nextcloud/updater; \ mkdir -p /usr/src/nextcloud/data; \ mkdir -p /usr/src/nextcloud/custom_apps; \ - chmod +x /usr/src/nextcloud/occ + chmod +x /usr/src/nextcloud/occ; \ + \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \ + rm -rf /var/lib/apt/lists/* COPY *.sh / COPY config/* /usr/src/nextcloud/config/ From 7a5bf34195dd82b0cfa9ce3c5d64055be9d80a45 Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Thu, 24 May 2018 13:50:50 +0200 Subject: [PATCH 2/2] Run update.sh --- 12.0/apache/Dockerfile | 16 +++++++++++++--- 12.0/fpm-alpine/Dockerfile | 2 +- 12.0/fpm/Dockerfile | 16 +++++++++++++--- 13.0/apache/Dockerfile | 16 +++++++++++++--- 13.0/fpm-alpine/Dockerfile | 2 +- 13.0/fpm/Dockerfile | 16 +++++++++++++--- 6 files changed, 54 insertions(+), 14 deletions(-) diff --git a/12.0/apache/Dockerfile b/12.0/apache/Dockerfile index 870ef1926..f1aae06e8 100644 --- a/12.0/apache/Dockerfile +++ b/12.0/apache/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT: created by update.sh from Dockerfile-debian.template -FROM php:7.1-apache +FROM php:7.1-apache-stretch # entrypoint.sh and cron.sh dependencies RUN set -ex; \ @@ -30,7 +30,7 @@ RUN set -ex; \ libldap2-dev \ libmcrypt-dev \ libmemcached-dev \ - libpng12-dev \ + libpng-dev \ libpq-dev \ libxml2-dev \ ; \ @@ -105,6 +105,13 @@ RUN a2enmod rewrite remoteip ;\ ENV NEXTCLOUD_VERSION 12.0.7 RUN set -ex; \ + fetchDeps=" \ + gnupg \ + dirmngr \ + "; \ + apt-get update; \ + apt-get install -y --no-install-recommends $fetchDeps; \ + \ curl -fsSL -o nextcloud.tar.bz2 \ "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2"; \ curl -fsSL -o nextcloud.tar.bz2.asc \ @@ -119,7 +126,10 @@ RUN set -ex; \ rm -rf /usr/src/nextcloud/updater; \ mkdir -p /usr/src/nextcloud/data; \ mkdir -p /usr/src/nextcloud/custom_apps; \ - chmod +x /usr/src/nextcloud/occ + chmod +x /usr/src/nextcloud/occ; \ + \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \ + rm -rf /var/lib/apt/lists/* COPY *.sh / COPY config/* /usr/src/nextcloud/config/ diff --git a/12.0/fpm-alpine/Dockerfile b/12.0/fpm-alpine/Dockerfile index 1ea92ef15..6040e83d9 100644 --- a/12.0/fpm-alpine/Dockerfile +++ b/12.0/fpm-alpine/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT: created by update.sh from Dockerfile-alpine.template -FROM php:7.1-fpm-alpine +FROM php:7.1-fpm-alpine3.7 # entrypoint.sh and cron.sh dependencies RUN set -ex; \ diff --git a/12.0/fpm/Dockerfile b/12.0/fpm/Dockerfile index 2556c6629..3b1dafb28 100644 --- a/12.0/fpm/Dockerfile +++ b/12.0/fpm/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT: created by update.sh from Dockerfile-debian.template -FROM php:7.1-fpm +FROM php:7.1-fpm-stretch # entrypoint.sh and cron.sh dependencies RUN set -ex; \ @@ -30,7 +30,7 @@ RUN set -ex; \ libldap2-dev \ libmcrypt-dev \ libmemcached-dev \ - libpng12-dev \ + libpng-dev \ libpq-dev \ libxml2-dev \ ; \ @@ -97,6 +97,13 @@ VOLUME /var/www/html ENV NEXTCLOUD_VERSION 12.0.7 RUN set -ex; \ + fetchDeps=" \ + gnupg \ + dirmngr \ + "; \ + apt-get update; \ + apt-get install -y --no-install-recommends $fetchDeps; \ + \ curl -fsSL -o nextcloud.tar.bz2 \ "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2"; \ curl -fsSL -o nextcloud.tar.bz2.asc \ @@ -111,7 +118,10 @@ RUN set -ex; \ rm -rf /usr/src/nextcloud/updater; \ mkdir -p /usr/src/nextcloud/data; \ mkdir -p /usr/src/nextcloud/custom_apps; \ - chmod +x /usr/src/nextcloud/occ + chmod +x /usr/src/nextcloud/occ; \ + \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \ + rm -rf /var/lib/apt/lists/* COPY *.sh / COPY config/* /usr/src/nextcloud/config/ diff --git a/13.0/apache/Dockerfile b/13.0/apache/Dockerfile index 8e904c57e..fedc3765f 100644 --- a/13.0/apache/Dockerfile +++ b/13.0/apache/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT: created by update.sh from Dockerfile-debian.template -FROM php:7.1-apache +FROM php:7.1-apache-stretch # entrypoint.sh and cron.sh dependencies RUN set -ex; \ @@ -30,7 +30,7 @@ RUN set -ex; \ libldap2-dev \ libmcrypt-dev \ libmemcached-dev \ - libpng12-dev \ + libpng-dev \ libpq-dev \ libxml2-dev \ ; \ @@ -105,6 +105,13 @@ RUN a2enmod rewrite remoteip ;\ ENV NEXTCLOUD_VERSION 13.0.2 RUN set -ex; \ + fetchDeps=" \ + gnupg \ + dirmngr \ + "; \ + apt-get update; \ + apt-get install -y --no-install-recommends $fetchDeps; \ + \ curl -fsSL -o nextcloud.tar.bz2 \ "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2"; \ curl -fsSL -o nextcloud.tar.bz2.asc \ @@ -119,7 +126,10 @@ RUN set -ex; \ rm -rf /usr/src/nextcloud/updater; \ mkdir -p /usr/src/nextcloud/data; \ mkdir -p /usr/src/nextcloud/custom_apps; \ - chmod +x /usr/src/nextcloud/occ + chmod +x /usr/src/nextcloud/occ; \ + \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \ + rm -rf /var/lib/apt/lists/* COPY *.sh / COPY config/* /usr/src/nextcloud/config/ diff --git a/13.0/fpm-alpine/Dockerfile b/13.0/fpm-alpine/Dockerfile index b63f1f822..47a6784fb 100644 --- a/13.0/fpm-alpine/Dockerfile +++ b/13.0/fpm-alpine/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT: created by update.sh from Dockerfile-alpine.template -FROM php:7.1-fpm-alpine +FROM php:7.1-fpm-alpine3.7 # entrypoint.sh and cron.sh dependencies RUN set -ex; \ diff --git a/13.0/fpm/Dockerfile b/13.0/fpm/Dockerfile index 662799462..1921c6346 100644 --- a/13.0/fpm/Dockerfile +++ b/13.0/fpm/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT: created by update.sh from Dockerfile-debian.template -FROM php:7.1-fpm +FROM php:7.1-fpm-stretch # entrypoint.sh and cron.sh dependencies RUN set -ex; \ @@ -30,7 +30,7 @@ RUN set -ex; \ libldap2-dev \ libmcrypt-dev \ libmemcached-dev \ - libpng12-dev \ + libpng-dev \ libpq-dev \ libxml2-dev \ ; \ @@ -97,6 +97,13 @@ VOLUME /var/www/html ENV NEXTCLOUD_VERSION 13.0.2 RUN set -ex; \ + fetchDeps=" \ + gnupg \ + dirmngr \ + "; \ + apt-get update; \ + apt-get install -y --no-install-recommends $fetchDeps; \ + \ curl -fsSL -o nextcloud.tar.bz2 \ "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2"; \ curl -fsSL -o nextcloud.tar.bz2.asc \ @@ -111,7 +118,10 @@ RUN set -ex; \ rm -rf /usr/src/nextcloud/updater; \ mkdir -p /usr/src/nextcloud/data; \ mkdir -p /usr/src/nextcloud/custom_apps; \ - chmod +x /usr/src/nextcloud/occ + chmod +x /usr/src/nextcloud/occ; \ + \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \ + rm -rf /var/lib/apt/lists/* COPY *.sh / COPY config/* /usr/src/nextcloud/config/