-
-
Save locopine/bdacce738be7fba4eae13c52dea98025 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