I would like to allow my wordpress instance to access database content via Redis, using the igbinary serializer. I am using the Redis Cache Plugin for Worpdress by Till Krüss. According to my understanding the containers should be in the following way:
- redis:alpine (https://hub.docker.com/_/redis) No modifications to be done here, right?
- wordpress:php7.4-fpm-alpine (https://hub.docker.com/_/wordpress/) Redis support with igbinary should be included here right?
How to properly include Redis with igbinary support with the wordpress iamge? I tried the following:
FROM wordpress:php7.4-fpm-alpine
RUN set -xe \
&& apk update \
&& apk upgrade \
&& apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS \
&& pecl install -o -f igbinary \
&& cd /usr/src/ \
&& pecl bundle redis \
&& docker-php-ext-configure /usr/src/redis --enable-redis-igbinary \
&& docker-php-ext-install -j$(nproc) /usr/src/redis \
&& docker-php-ext-enable redis \
&& docker-php-ext-enable igbinary \
&& apk del .phpize-deps
I read, that pecl is outdated and should not be used anymore (Instead use pickle or composer, which however do not seem to offer the right packages)
So the question is: How does a Dockerfile have to look like to allow the use of redis with igbinary serializer using modern standards?
I hope you guys can help me :)
Use the following:
It is working when using pickel and respecting the order of enabling igbinary extension before redis extension.