Skip to content

Instantly share code, notes, and snippets.

@jbrinley
Last active September 10, 2019 09:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbrinley/51c6c3d22708b944cc39b6fd3275db82 to your computer and use it in GitHub Desktop.
Save jbrinley/51c6c3d22708b944cc39b6fd3275db82 to your computer and use it in GitHub Desktop.
Install php7 memcached on alpine linux - dockerfile snippet
RUN
apk add --update \
autoconf \
file \
g++ \
gcc \
libc-dev \
make \
pkgconf \
re2c \
zlib-dev \
libmemcached-dev && \
cd /tmp && \
wget https://github.com/php-memcached-dev/php-memcached/archive/php7.zip && \
unzip php7.zip && \
cd php-memcached-php7 && \
phpize7 || return 1 && \
./configure --prefix=/usr --disable-memcached-sasl --with-php-config=php-config7 || return 1 && \
make || return 1 && \
make INSTALL_ROOT="" install || return 1 && \
install -d "/etc/php7/conf.d" || return 1 && \
echo "extension=memcached.so" > /etc/php7/conf.d/20_memcached.ini && \
cd /tmp && rm -rf php-memcached-php7 && rm php7.zip
@Dyktus
Copy link

Dyktus commented Dec 3, 2018

If phpize7 is not found you should do
RUN apk --no-cache add php7-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment