From 2f90715d31ddfc0983ab6b55918ee8078e506f0b Mon Sep 17 00:00:00 2001 From: Robert Dailey Date: Mon, 10 Dec 2018 18:06:21 -0600 Subject: [PATCH] Add imagick php extension There is a warning issued in Nextcloud 15 about 'imagick' php extension not being present. They highly recommend that it be installed. Fixes #574, fixes #263 Signed-off-by: Robert Dailey --- .examples/README.md | 5 ----- .examples/dockerfiles/full/apache/Dockerfile | 6 +++--- .examples/dockerfiles/full/fpm/Dockerfile | 6 +++--- 13.0/apache/Dockerfile | 3 +++ 13.0/fpm-alpine/Dockerfile | 3 +++ 13.0/fpm/Dockerfile | 3 +++ 14.0/apache/Dockerfile | 3 +++ 14.0/fpm-alpine/Dockerfile | 3 +++ 14.0/fpm/Dockerfile | 3 +++ 15.0/apache/Dockerfile | 3 +++ 15.0/fpm-alpine/Dockerfile | 3 +++ 15.0/fpm/Dockerfile | 3 +++ Dockerfile-alpine.template | 3 +++ Dockerfile-debian.template | 3 +++ update.sh | 2 ++ 15 files changed, 41 insertions(+), 11 deletions(-) diff --git a/.examples/README.md b/.examples/README.md index d2183447..f2842d92 100644 --- a/.examples/README.md +++ b/.examples/README.md @@ -32,11 +32,6 @@ The required steps for each optional/recommended package that is not already in #### PHP Module bz2 `docker-php-ext-install bz2` -#### PHP Module imagick -`apt install libmagickwand-dev` -`pecl install imagick` -`docker-php-ext-enable imagick` - #### PHP Module imap `apt install libc-client-dev libkrb5-dev` `docker-php-ext-configure imap --with-kerberos --with-imap-ssl` diff --git a/.examples/dockerfiles/full/apache/Dockerfile b/.examples/dockerfiles/full/apache/Dockerfile index fc5e848c..178ca844 100644 --- a/.examples/dockerfiles/full/apache/Dockerfile +++ b/.examples/dockerfiles/full/apache/Dockerfile @@ -4,7 +4,7 @@ RUN mkdir -p /usr/share/man/man1 \ && apt-get update && apt-get install -y \ supervisor \ ffmpeg \ - libmagickwand-dev \ + libbz2-dev \ libgmp3-dev \ libc-client-dev \ libkrb5-dev \ @@ -15,8 +15,8 @@ RUN mkdir -p /usr/share/man/man1 \ && docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ && ln -s "/usr/include/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)/gmp.h" /usr/include/gmp.h \ && docker-php-ext-install bz2 gmp imap \ - && pecl install imagick smbclient \ - && docker-php-ext-enable imagick smbclient \ + && pecl install smbclient \ + && docker-php-ext-enable smbclient \ && mkdir /var/log/supervisord /var/run/supervisord COPY supervisord.conf /etc/supervisor/supervisord.conf diff --git a/.examples/dockerfiles/full/fpm/Dockerfile b/.examples/dockerfiles/full/fpm/Dockerfile index b7311258..b0c61d64 100644 --- a/.examples/dockerfiles/full/fpm/Dockerfile +++ b/.examples/dockerfiles/full/fpm/Dockerfile @@ -4,7 +4,7 @@ RUN mkdir -p /usr/share/man/man1 \ && apt-get update && apt-get install -y \ supervisor \ ffmpeg \ - libmagickwand-dev \ + libbz2-dev \ libgmp3-dev \ libc-client-dev \ libkrb5-dev \ @@ -15,8 +15,8 @@ RUN mkdir -p /usr/share/man/man1 \ && docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ && ln -s "/usr/include/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)/gmp.h" /usr/include/gmp.h \ && docker-php-ext-install bz2 gmp imap \ - && pecl install imagick smbclient \ - && docker-php-ext-enable imagick smbclient \ + && pecl install smbclient \ + && docker-php-ext-enable smbclient \ && mkdir /var/log/supervisord /var/run/supervisord COPY supervisord.conf /etc/supervisor/supervisord.conf diff --git a/13.0/apache/Dockerfile b/13.0/apache/Dockerfile index 2a3ba93e..5c096bb4 100644 --- a/13.0/apache/Dockerfile +++ b/13.0/apache/Dockerfile @@ -33,6 +33,7 @@ RUN set -ex; \ libpng-dev \ libpq-dev \ libxml2-dev \ + libmagickwand-dev \ ; \ \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ @@ -54,11 +55,13 @@ RUN set -ex; \ pecl install APCu-5.1.15; \ pecl install memcached-3.0.4; \ pecl install redis-4.2.0; \ + pecl install imagick-3.4.3; \ \ docker-php-ext-enable \ apcu \ memcached \ redis \ + imagick \ ; \ \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies diff --git a/13.0/fpm-alpine/Dockerfile b/13.0/fpm-alpine/Dockerfile index 9f22e0f2..b2cb6b8c 100644 --- a/13.0/fpm-alpine/Dockerfile +++ b/13.0/fpm-alpine/Dockerfile @@ -28,6 +28,7 @@ RUN set -ex; \ openldap-dev \ pcre-dev \ postgresql-dev \ + imagemagick-dev \ ; \ \ docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr; \ @@ -48,11 +49,13 @@ RUN set -ex; \ pecl install APCu-5.1.15; \ pecl install memcached-3.0.4; \ pecl install redis-4.2.0; \ + pecl install imagick-3.4.3; \ \ docker-php-ext-enable \ apcu \ memcached \ redis \ + imagick \ ; \ \ runDeps="$( \ diff --git a/13.0/fpm/Dockerfile b/13.0/fpm/Dockerfile index 8ec966da..ad42be59 100644 --- a/13.0/fpm/Dockerfile +++ b/13.0/fpm/Dockerfile @@ -33,6 +33,7 @@ RUN set -ex; \ libpng-dev \ libpq-dev \ libxml2-dev \ + libmagickwand-dev \ ; \ \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ @@ -54,11 +55,13 @@ RUN set -ex; \ pecl install APCu-5.1.15; \ pecl install memcached-3.0.4; \ pecl install redis-4.2.0; \ + pecl install imagick-3.4.3; \ \ docker-php-ext-enable \ apcu \ memcached \ redis \ + imagick \ ; \ \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies diff --git a/14.0/apache/Dockerfile b/14.0/apache/Dockerfile index 9ac1e34a..5db06fee 100644 --- a/14.0/apache/Dockerfile +++ b/14.0/apache/Dockerfile @@ -33,6 +33,7 @@ RUN set -ex; \ libpng-dev \ libpq-dev \ libxml2-dev \ + libmagickwand-dev \ ; \ \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ @@ -54,11 +55,13 @@ RUN set -ex; \ pecl install APCu-5.1.15; \ pecl install memcached-3.0.4; \ pecl install redis-4.2.0; \ + pecl install imagick-3.4.3; \ \ docker-php-ext-enable \ apcu \ memcached \ redis \ + imagick \ ; \ \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies diff --git a/14.0/fpm-alpine/Dockerfile b/14.0/fpm-alpine/Dockerfile index 87dd98ce..d21cf51f 100644 --- a/14.0/fpm-alpine/Dockerfile +++ b/14.0/fpm-alpine/Dockerfile @@ -28,6 +28,7 @@ RUN set -ex; \ openldap-dev \ pcre-dev \ postgresql-dev \ + imagemagick-dev \ ; \ \ docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr; \ @@ -48,11 +49,13 @@ RUN set -ex; \ pecl install APCu-5.1.15; \ pecl install memcached-3.0.4; \ pecl install redis-4.2.0; \ + pecl install imagick-3.4.3; \ \ docker-php-ext-enable \ apcu \ memcached \ redis \ + imagick \ ; \ \ runDeps="$( \ diff --git a/14.0/fpm/Dockerfile b/14.0/fpm/Dockerfile index 966c4be3..7b388db1 100644 --- a/14.0/fpm/Dockerfile +++ b/14.0/fpm/Dockerfile @@ -33,6 +33,7 @@ RUN set -ex; \ libpng-dev \ libpq-dev \ libxml2-dev \ + libmagickwand-dev \ ; \ \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ @@ -54,11 +55,13 @@ RUN set -ex; \ pecl install APCu-5.1.15; \ pecl install memcached-3.0.4; \ pecl install redis-4.2.0; \ + pecl install imagick-3.4.3; \ \ docker-php-ext-enable \ apcu \ memcached \ redis \ + imagick \ ; \ \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies diff --git a/15.0/apache/Dockerfile b/15.0/apache/Dockerfile index 48f1195b..454842aa 100644 --- a/15.0/apache/Dockerfile +++ b/15.0/apache/Dockerfile @@ -33,6 +33,7 @@ RUN set -ex; \ libpng-dev \ libpq-dev \ libxml2-dev \ + libmagickwand-dev \ ; \ \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ @@ -54,11 +55,13 @@ RUN set -ex; \ pecl install APCu-5.1.15; \ pecl install memcached-3.0.4; \ pecl install redis-4.2.0; \ + pecl install imagick-3.4.3; \ \ docker-php-ext-enable \ apcu \ memcached \ redis \ + imagick \ ; \ \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies diff --git a/15.0/fpm-alpine/Dockerfile b/15.0/fpm-alpine/Dockerfile index d015b235..d6ac2a2e 100644 --- a/15.0/fpm-alpine/Dockerfile +++ b/15.0/fpm-alpine/Dockerfile @@ -28,6 +28,7 @@ RUN set -ex; \ openldap-dev \ pcre-dev \ postgresql-dev \ + imagemagick-dev \ ; \ \ docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr; \ @@ -48,11 +49,13 @@ RUN set -ex; \ pecl install APCu-5.1.15; \ pecl install memcached-3.0.4; \ pecl install redis-4.2.0; \ + pecl install imagick-3.4.3; \ \ docker-php-ext-enable \ apcu \ memcached \ redis \ + imagick \ ; \ \ runDeps="$( \ diff --git a/15.0/fpm/Dockerfile b/15.0/fpm/Dockerfile index 6b2c696a..8cc1df2a 100644 --- a/15.0/fpm/Dockerfile +++ b/15.0/fpm/Dockerfile @@ -33,6 +33,7 @@ RUN set -ex; \ libpng-dev \ libpq-dev \ libxml2-dev \ + libmagickwand-dev \ ; \ \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ @@ -54,11 +55,13 @@ RUN set -ex; \ pecl install APCu-5.1.15; \ pecl install memcached-3.0.4; \ pecl install redis-4.2.0; \ + pecl install imagick-3.4.3; \ \ docker-php-ext-enable \ apcu \ memcached \ redis \ + imagick \ ; \ \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 6683f2b1..4d282f54 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -27,6 +27,7 @@ RUN set -ex; \ openldap-dev \ pcre-dev \ postgresql-dev \ + imagemagick-dev \ ; \ \ docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr; \ @@ -47,11 +48,13 @@ RUN set -ex; \ pecl install APCu-%%APCU_VERSION%%; \ pecl install memcached-%%MEMCACHED_VERSION%%; \ pecl install redis-%%REDIS_VERSION%%; \ + pecl install imagick-%%IMAGICK_VERSION%%; \ \ docker-php-ext-enable \ apcu \ memcached \ redis \ + imagick \ ; \ \ runDeps="$( \ diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index 7f451512..d10ae367 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -32,6 +32,7 @@ RUN set -ex; \ libpng-dev \ libpq-dev \ libxml2-dev \ + libmagickwand-dev \ ; \ \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ @@ -53,11 +54,13 @@ RUN set -ex; \ pecl install APCu-%%APCU_VERSION%%; \ pecl install memcached-%%MEMCACHED_VERSION%%; \ pecl install redis-%%REDIS_VERSION%%; \ + pecl install imagick-%%IMAGICK_VERSION%%; \ \ docker-php-ext-enable \ apcu \ memcached \ redis \ + imagick \ ; \ \ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies diff --git a/update.sh b/update.sh index 641ba587..8a323635 100755 --- a/update.sh +++ b/update.sh @@ -28,6 +28,7 @@ declare -A pecl_versions=( [APCu]='5.1.15' [memcached]='3.0.4' [redis]='4.2.0' + [imagick]='3.4.3' ) variants=( @@ -78,6 +79,7 @@ function create_variant() { s/%%APCU_VERSION%%/'"${pecl_versions[APCu]}"'/g; s/%%MEMCACHED_VERSION%%/'"${pecl_versions[memcached]}"'/g; s/%%REDIS_VERSION%%/'"${pecl_versions[redis]}"'/g; + s/%%IMAGICK_VERSION%%/'"${pecl_versions[imagick]}"'/g; ' "$dir/Dockerfile" # Copy the shell scripts