Commit d3a6116a authored by Mahmoud Zalt's avatar Mahmoud Zalt

move PHP Memcached from the base image to LaraDock

parent eb81dfc1
...@@ -36,6 +36,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me> ...@@ -36,6 +36,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
# - INSTALL_XDEBUG= false # - INSTALL_XDEBUG= false
# - INSTALL_MONGO= false # - INSTALL_MONGO= false
# - INSTALL_ZIP_ARCHIVE= false # - INSTALL_ZIP_ARCHIVE= false
# - INSTALL_MEMCACHED= false
# #
##################################### #####################################
...@@ -74,6 +75,29 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \ ...@@ -74,6 +75,29 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
docker-php-ext-enable zip \ docker-php-ext-enable zip \
;fi ;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
# #
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment