From 53b3ad0f7ea0afee7775bf10ed18b16ebd236689 Mon Sep 17 00:00:00 2001 From: Eugene Kirdzei Date: Thu, 31 Aug 2017 16:41:01 +0300 Subject: [PATCH 1/3] Fix Php Redis extension installation --- docker-compose.yml | 1 + env-example | 1 + php-fpm/Dockerfile-71 | 2 +- workspace/Dockerfile-71 | 15 ++++++++++++++- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2173df74..fcd2342b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,6 +19,7 @@ services: - INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE} - INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP} - INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO} + - INSTALL_PHPREDIS=${WORKSPACE_INSTALL_PHPREDIS} - INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL} - INSTALL_NODE=${WORKSPACE_INSTALL_NODE} - INSTALL_YARN=${WORKSPACE_INSTALL_YARN} diff --git a/env-example b/env-example index 15beb1a2..fd73b994 100644 --- a/env-example +++ b/env-example @@ -32,6 +32,7 @@ PHP_INTERPRETER=php-fpm WORKSPACE_INSTALL_XDEBUG=false WORKSPACE_INSTALL_SOAP=false WORKSPACE_INSTALL_MONGO=false +WORKSPACE_INSTALL_PHPREDIS=false WORKSPACE_INSTALL_MSSQL=false WORKSPACE_INSTALL_NODE=false WORKSPACE_INSTALL_YARN=false diff --git a/php-fpm/Dockerfile-71 b/php-fpm/Dockerfile-71 index 90ea2bd0..411e12d7 100644 --- a/php-fpm/Dockerfile-71 +++ b/php-fpm/Dockerfile-71 @@ -84,7 +84,7 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \ ARG INSTALL_PHPREDIS=false RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ # Install Php Redis Extension - pecl install -o -f redis \ + printf "\n" | pecl install -o -f redis \ && rm -rf /tmp/pear \ && docker-php-ext-enable redis \ ;fi diff --git a/workspace/Dockerfile-71 b/workspace/Dockerfile-71 index b0320e6b..72b3f770 100644 --- a/workspace/Dockerfile-71 +++ b/workspace/Dockerfile-71 @@ -186,11 +186,24 @@ ARG INSTALL_MONGO=false ENV INSTALL_MONGO ${INSTALL_MONGO} RUN if [ ${INSTALL_MONGO} = true ]; then \ # Install the mongodb extension - pecl install mongodb && \ + pecl -q install mongodb && \ echo "extension=mongodb.so" >> /etc/php/7.1/mods-available/mongodb.ini && \ ln -s /etc/php/7.1/mods-available/mongodb.ini /etc/php/7.1/cli/conf.d/30-mongodb.ini \ ;fi +##################################### +# PHP REDIS EXTENSION FOR PHP 7 +##################################### + +ARG INSTALL_PHPREDIS=false +ENV INSTALL_PHPREDIS ${INSTALL_PHPREDIS} +RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ + # Install Php Redis extension + printf "\n" | pecl -q install -o -f redis && \ + echo "extension=redis.so" >> /etc/php/7.1/mods-available/redis.ini && \ + phpenmod redis \ +;fi + ##################################### # Drush: ##################################### From cddc934e1e89c2b8af814e5b41b3e9204a5960fe Mon Sep 17 00:00:00 2001 From: Eugene Kirdzei Date: Mon, 4 Sep 2017 11:33:14 +0300 Subject: [PATCH 2/3] Fix phpreddis installation for all versions of php --- php-fpm/Dockerfile-56 | 2 +- php-fpm/Dockerfile-70 | 2 +- workspace/Dockerfile-56 | 13 +++++++++++++ workspace/Dockerfile-70 | 13 +++++++++++++ workspace/Dockerfile-71 | 2 +- 5 files changed, 29 insertions(+), 3 deletions(-) diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index 1d8fd976..1b240c45 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -87,7 +87,7 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \ ARG INSTALL_PHPREDIS=false RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ # Install Php Redis Extension - pecl install -o -f redis \ + printf "\n" | pecl install -o -f redis \ && rm -rf /tmp/pear \ && docker-php-ext-enable redis \ ;fi diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index b643a384..1028fbc9 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -84,7 +84,7 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \ ARG INSTALL_PHPREDIS=false RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ # Install Php Redis Extension - pecl install -o -f redis \ + printf "\n" | pecl install -o -f redis \ && rm -rf /tmp/pear \ && docker-php-ext-enable redis \ ;fi diff --git a/workspace/Dockerfile-56 b/workspace/Dockerfile-56 index a5ba7889..5e775e54 100644 --- a/workspace/Dockerfile-56 +++ b/workspace/Dockerfile-56 @@ -194,6 +194,19 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \ ln -s /etc/php/5.6/mods-available/mongodb.ini /etc/php/5.6/cli/conf.d/30-mongodb.ini \ ;fi +##################################### +# PHP REDIS EXTENSION FOR PHP 5.6 +##################################### + +ARG INSTALL_PHPREDIS=false +ENV INSTALL_PHPREDIS ${INSTALL_PHPREDIS} +RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ + # Install Php Redis extension + printf "\n" | pecl -q install -o -f redis && \ + echo "extension=redis.so" >> /etc/php/5.6/mods-available/redis.ini && \ + phpenmod redis \ +;fi + ##################################### # Drush: ##################################### diff --git a/workspace/Dockerfile-70 b/workspace/Dockerfile-70 index 3d1cde55..48443a2b 100644 --- a/workspace/Dockerfile-70 +++ b/workspace/Dockerfile-70 @@ -194,6 +194,19 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \ ln -s /etc/php/7.0/mods-available/mongodb.ini /etc/php/7.0/cli/conf.d/30-mongodb.ini \ ;fi +##################################### +# PHP REDIS EXTENSION FOR PHP 7 +##################################### + +ARG INSTALL_PHPREDIS=false +ENV INSTALL_PHPREDIS ${INSTALL_PHPREDIS} +RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ + # Install Php Redis extension + printf "\n" | pecl -q install -o -f redis && \ + echo "extension=redis.so" >> /etc/php/7.0/mods-available/redis.ini && \ + phpenmod redis \ +;fi + ##################################### # Drush: ##################################### diff --git a/workspace/Dockerfile-71 b/workspace/Dockerfile-71 index 72b3f770..cba070d5 100644 --- a/workspace/Dockerfile-71 +++ b/workspace/Dockerfile-71 @@ -192,7 +192,7 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \ ;fi ##################################### -# PHP REDIS EXTENSION FOR PHP 7 +# PHP REDIS EXTENSION FOR PHP 7.1 ##################################### ARG INSTALL_PHPREDIS=false From a36620c3bd4e297839f85272efecb6dac74ac438 Mon Sep 17 00:00:00 2001 From: Eugene Kirdzei Date: Mon, 4 Sep 2017 12:05:34 +0300 Subject: [PATCH 3/3] Restart build --- php-fpm/Dockerfile-71 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php-fpm/Dockerfile-71 b/php-fpm/Dockerfile-71 index 411e12d7..b58a0ee3 100644 --- a/php-fpm/Dockerfile-71 +++ b/php-fpm/Dockerfile-71 @@ -78,7 +78,7 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \ ;fi ##################################### -# PHP REDIS EXTENSION FOR PHP 7 +# PHP REDIS EXTENSION FOR PHP 7.0 ##################################### ARG INSTALL_PHPREDIS=false