Created
March 1, 2020 11:46
-
-
Save mingalevme/c47c53e487729400aa3ccb7b1ef8adea to your computer and use it in GitHub Desktop.
Installing PHP Redis extension inside PHP-Alpine-based Docker container
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
NPROC=$(getconf _NPROCESSORS_ONLN) | |
mkdir -p /usr/src/php/ext | |
cd /usr/src/php/ext | |
pecl bundle redis | |
docker-php-ext-configure redis --enable-redis-igbinary --enable-redis-lzf | |
docker-php-ext-install -j${NPROC} redis | |
cd - |
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
apk --no-cache add pcre-dev ${PHPIZE_DEPS} \ | |
&& pecl install redis \ | |
&& docker-php-ext-enable redis \ | |
&& apk del pcre-dev ${PHPIZE_DEPS} \ | |
&& rm -rf /tmp/pear | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment