Skip to content

Instantly share code, notes, and snippets.

@ivankristianto
Created June 15, 2016 03:16
Show Gist options
  • Save ivankristianto/38461218405eeb7c38bf8e8d25996607 to your computer and use it in GitHub Desktop.
Save ivankristianto/38461218405eeb7c38bf8e8d25996607 to your computer and use it in GitHub Desktop.
Install PHP Memcache in docker php
PHP 5.6:
RUN apt-get update \
&& apt-get install -y libmemcached11 libmemcachedutil2 build-essential libmemcached-dev libz-dev \
&& pecl install memcached \
&& echo extension=memcached.so >> /usr/local/etc/php/conf.d/memcached.ini \
&& apt-get remove -y build-essential libmemcached-dev libz-dev \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /tmp/pear
PHP 7:
git clone https://github.com/php-memcached-dev/php-memcached /usr/src/php/ext/memcached \
&& cd /usr/src/php/ext/memcached && git checkout -b php7 origin/php7 \
&& docker-php-ext-configure memcached \
&& docker-php-ext-install memcached
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment