move PHP Memcached from the base image to LaraDock

This commit is contained in:
Mahmoud Zalt 2016-08-16 15:12:35 +03:00
parent eb81dfc1be
commit d3a6116a42
1 changed files with 24 additions and 0 deletions

View File

@ -36,6 +36,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
# - 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
#
#--------------------------------------------------------------------------