Browse Source

Install PHPREDIS into Laravel-Horizon docker image

Valentino Lauciani 5 years ago
parent
commit
df15420be0
1 changed files with 9 additions and 0 deletions
  1. 9 0
      laravel-horizon/Dockerfile

+ 9 - 0
laravel-horizon/Dockerfile

@@ -50,6 +50,15 @@ ARG INSTALL_CASSANDRA=false
 RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
   apk --update add cassandra-cpp-driver \
   ;fi
+  
+# Install PhpRedis
+ARG INSTALL_PHPREDIS=false
+RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
+    # Install Php Redis Extension
+    printf "\n" | pecl install -o -f redis \
+    &&  rm -rf /tmp/pear \
+    &&  docker-php-ext-enable redis \
+;fi
 
 WORKDIR /usr/src
 RUN if [ ${INSTALL_CASSANDRA} = true ]; then \