Fix phpreddis installation for all versions of php

This commit is contained in:
Eugene Kirdzei 2017-09-04 11:33:14 +03:00
parent 53b3ad0f7e
commit cddc934e1e
5 changed files with 29 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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:
#####################################

View File

@ -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:
#####################################

View File

@ -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