Skip to content

Instantly share code, notes, and snippets.

@ivankristianto
Created June 19, 2016 15:14
Show Gist options
  • Save ivankristianto/7c3d009b86bf938c489fe694c4bc9160 to your computer and use it in GitHub Desktop.
Save ivankristianto/7c3d009b86bf938c489fe694c4bc9160 to your computer and use it in GitHub Desktop.
Install memcached php7 on docker
FROM php:7.0-fpm
# ...
RUN apt-get update && apt-get install -y \
libpq-dev \
libmemcached-dev \
curl
# ...
# Install Memcached for php 7
RUN curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz" \
&& mkdir -p /usr/src/php/ext/memcached \
&& tar -C /usr/src/php/ext/memcached -zxvf /tmp/memcached.tar.gz --strip 1 \
&& docker-php-ext-configure memcached \
&& docker-php-ext-install memcached \
&& rm /tmp/memcached.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment