From b2e372054fad67623634260b48a48fbc0ec49386 Mon Sep 17 00:00:00 2001 From: Arhey Date: Tue, 5 Sep 2017 23:36:30 +0300 Subject: [PATCH] Fixed php-fpm build --- docker-compose.yml | 1 + env-example | 1 + php-fpm/Dockerfile-56 | 4 +++- php-fpm/Dockerfile-70 | 4 +++- php-fpm/Dockerfile-71 | 4 +++- workspace/Dockerfile-56 | 2 +- workspace/Dockerfile-70 | 2 +- workspace/Dockerfile-71 | 2 +- 8 files changed, 14 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3f7506f..d7ddf84 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -82,6 +82,7 @@ services: - INSTALL_LDAP=${PHP_FPM_INSTALL_LDAP} - INSTALL_SWOOLE=${PHP_FPM_INSTALL_SWOOLE} - INSTALL_IMAGE_OPTIMIZERS=${PHP_FPM_INSTALL_IMAGE_OPTIMIZERS} + - INSTALL_IMAGEMAGICK=${PHP_FPM_INSTALL_IMAGEMAGICK} dockerfile: "Dockerfile-${PHP_VERSION}" volumes_from: - applications diff --git a/env-example b/env-example index 6302c69..34670e7 100644 --- a/env-example +++ b/env-example @@ -78,6 +78,7 @@ PHP_FPM_INSTALL_GHOSTSCRIPT=false PHP_FPM_INSTALL_LDAP=false PHP_FPM_INSTALL_SWOOLE=false PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=false +PHP_FPM_INSTALL_IMAGEMAGICK=false ### NGINX ############################################################################################################## diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index 0caf4d3..6c1d19e 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -276,7 +276,9 @@ USER root ARG INSTALL_IMAGEMAGICK=false ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK} RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ - apt-get install -y --force-yes imagemagick php-imagick && \ + apt-get update -y && \ + apt-get install -y libmagickwand-dev imagemagick && \ + pecl install imagick && \ docker-php-ext-enable imagick \ ;fi diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index 264c9bb..c1bdcd1 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -300,7 +300,9 @@ USER root ARG INSTALL_IMAGEMAGICK=false ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK} RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ - apt-get install -y --force-yes imagemagick php-imagick && \ + apt-get update -y && \ + apt-get install -y libmagickwand-dev imagemagick && \ + pecl install imagick && \ docker-php-ext-enable imagick \ ;fi diff --git a/php-fpm/Dockerfile-71 b/php-fpm/Dockerfile-71 index 66bf463..7468224 100644 --- a/php-fpm/Dockerfile-71 +++ b/php-fpm/Dockerfile-71 @@ -307,7 +307,9 @@ USER root ARG INSTALL_IMAGEMAGICK=false ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK} RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ - apt-get install -y --force-yes imagemagick php-imagick && \ + apt-get update -y && \ + apt-get install -y libmagickwand-dev imagemagick && \ + pecl install imagick && \ docker-php-ext-enable imagick \ ;fi diff --git a/workspace/Dockerfile-56 b/workspace/Dockerfile-56 index b6e1de2..de18068 100644 --- a/workspace/Dockerfile-56 +++ b/workspace/Dockerfile-56 @@ -503,7 +503,7 @@ USER root ARG INSTALL_IMAGEMAGICK=false ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK} RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ - apt-get install -y --force-yes imagemagick \ + apt-get install -y --force-yes imagemagick php-imagick \ ;fi # diff --git a/workspace/Dockerfile-70 b/workspace/Dockerfile-70 index 824c4a3..9ca8e6c 100644 --- a/workspace/Dockerfile-70 +++ b/workspace/Dockerfile-70 @@ -584,7 +584,7 @@ USER root ARG INSTALL_IMAGEMAGICK=false ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK} RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ - apt-get install -y --force-yes imagemagick \ + apt-get install -y --force-yes imagemagick php-imagick \ ;fi # diff --git a/workspace/Dockerfile-71 b/workspace/Dockerfile-71 index 3030447..b6f423f 100644 --- a/workspace/Dockerfile-71 +++ b/workspace/Dockerfile-71 @@ -589,7 +589,7 @@ USER root ARG INSTALL_IMAGEMAGICK=false ENV INSTALL_IMAGEMAGICK ${INSTALL_IMAGEMAGICK} RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ - apt-get install -y --force-yes imagemagick \ + apt-get install -y --force-yes imagemagick php-imagick \ ;fi #