Last active
September 10, 2019 09:48
-
-
Save jbrinley/51c6c3d22708b944cc39b6fd3275db82 to your computer and use it in GitHub Desktop.
Install php7 memcached on alpine linux - dockerfile snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If phpize7 is not found you should do
RUN apk --no-cache add php7-dev