Skip to content

Commit 53b3ad0

Browse files
committed
Fix Php Redis extension installation
1 parent fdcf911 commit 53b3ad0

4 files changed

Lines changed: 17 additions & 2 deletions

File tree

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ services:
1919
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
2020
- INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
2121
- INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO}
22+
- INSTALL_PHPREDIS=${WORKSPACE_INSTALL_PHPREDIS}
2223
- INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL}
2324
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
2425
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN}

env-example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ PHP_INTERPRETER=php-fpm
3232
WORKSPACE_INSTALL_XDEBUG=false
3333
WORKSPACE_INSTALL_SOAP=false
3434
WORKSPACE_INSTALL_MONGO=false
35+
WORKSPACE_INSTALL_PHPREDIS=false
3536
WORKSPACE_INSTALL_MSSQL=false
3637
WORKSPACE_INSTALL_NODE=false
3738
WORKSPACE_INSTALL_YARN=false

php-fpm/Dockerfile-71

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
8484
ARG INSTALL_PHPREDIS=false
8585
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
8686
# Install Php Redis Extension
87-
pecl install -o -f redis \
87+
printf "\n" | pecl install -o -f redis \
8888
&& rm -rf /tmp/pear \
8989
&& docker-php-ext-enable redis \
9090
;fi

workspace/Dockerfile-71

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,24 @@ ARG INSTALL_MONGO=false
186186
ENV INSTALL_MONGO ${INSTALL_MONGO}
187187
RUN if [ ${INSTALL_MONGO} = true ]; then \
188188
# Install the mongodb extension
189-
pecl install mongodb && \
189+
pecl -q install mongodb && \
190190
echo "extension=mongodb.so" >> /etc/php/7.1/mods-available/mongodb.ini && \
191191
ln -s /etc/php/7.1/mods-available/mongodb.ini /etc/php/7.1/cli/conf.d/30-mongodb.ini \
192192
;fi
193193

194+
#####################################
195+
# PHP REDIS EXTENSION FOR PHP 7
196+
#####################################
197+
198+
ARG INSTALL_PHPREDIS=false
199+
ENV INSTALL_PHPREDIS ${INSTALL_PHPREDIS}
200+
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
201+
# Install Php Redis extension
202+
printf "\n" | pecl -q install -o -f redis && \
203+
echo "extension=redis.so" >> /etc/php/7.1/mods-available/redis.ini && \
204+
phpenmod redis \
205+
;fi
206+
194207
#####################################
195208
# Drush:
196209
#####################################

0 commit comments

Comments
 (0)