diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index d99bf69..08427d3 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -36,6 +36,7 @@ MAINTAINER Mahmoud Zalt # - INSTALL_XDEBUG= false # - INSTALL_MONGO= false # - INSTALL_ZIP_ARCHIVE= false +# - INSTALL_MEMCACHED= false # ##################################### @@ -74,6 +75,29 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \ docker-php-ext-enable zip \ ;fi +##################################### +# PHP Memcached: +##################################### + +ARG INSTALL_MEMCACHED=true +ENV INSTALL_MEMCACHED ${INSTALL_MEMCACHED} +RUN if [ ${INSTALL_MEMCACHED} = true ]; then \ + # Install the php memcached extension + curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz" \ + && mkdir -p memcached \ + && tar -C memcached -zxvf /tmp/memcached.tar.gz --strip 1 \ + && ( \ + cd memcached \ + && phpize \ + && ./configure \ + && make -j$(nproc) \ + && make install \ + ) \ + && rm -r memcached \ + && rm /tmp/memcached.tar.gz \ + && docker-php-ext-enable memcached \ +;fi + # #--------------------------------------------------------------------------