From d3a6116a42810eb69c666aa58e5f505ca108c0e5 Mon Sep 17 00:00:00 2001 From: Mahmoud Zalt Date: Tue, 16 Aug 2016 15:12:35 +0300 Subject: [PATCH] move PHP Memcached from the base image to LaraDock --- php-fpm/Dockerfile-70 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index d99bf69f..08427d36 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 + # #--------------------------------------------------------------------------