Skip to content

Commit 5dc2b08

Browse files
committed
feat: switch redis extension for relay
1 parent 85b8dad commit 5dc2b08

File tree

9 files changed

+25
-45
lines changed

9 files changed

+25
-45
lines changed

runtime/base/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -436,21 +436,21 @@ RUN set -xe; \
436436
make install
437437

438438
###############################################################################
439-
# Redis Build
440-
# https://github.com/phpredis/phpredis/releases
439+
# Relay Build
440+
# https://github.com/cachewerk/relay/releases
441441
# Needs:
442442
#
443443
# Needed by:
444444
# - php
445-
ENV REDIS_BUILD_DIR=${BUILD_DIR}/redis
446-
ENV VERSION_REDIS_EXTENSION=5.3.7
445+
ENV RELAY_BUILD_DIR=${BUILD_DIR}/relay
446+
ENV VERSION_RELAY_EXTENSION=0.4.1
447447

448448
# Install some dev files for using old libraries already on the system
449449
# readline-devel : needed for the --with-libedit flag
450450
# gettext-devel : needed for the --with-gettext flag
451451
# libicu-devel : needed for
452452
# libxslt-devel : needed for the XSL extension
453-
# libzstd-devel: needed for PHP Redis
453+
# libzstd-devel: needed for Relay
454454
# sqlite-devel : Since PHP 7.4 this must be installed (https://github.com/php/php-src/blob/99b8e67615159fc600a615e1e97f2d1cf18f14cb/UPGRADING#L616-L619)
455455
# re2c : needed for PHP 7.4
456456
RUN LD_LIBRARY_PATH= yum install -y re2c readline-devel gettext-devel libicu-devel libxslt-devel libzstd-devel sqlite-devel

runtime/php-72/Dockerfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,6 @@ RUN set -xe; \
8585
make -j $(nproc); \
8686
make install;
8787

88-
WORKDIR ${REDIS_BUILD_DIR}
89-
RUN set -xe; \
90-
pecl download redis-${VERSION_REDIS_EXTENSION}; \
91-
tar xzf redis-${VERSION_REDIS_EXTENSION}.tgz
92-
WORKDIR ${REDIS_BUILD_DIR}/redis-${VERSION_REDIS_EXTENSION}
93-
RUN set -xe; \
94-
phpize; \
95-
./configure --enable-redis-igbinary --enable-redis-zstd; \
96-
make && make install;
97-
9888
# Install Composer
9989
RUN curl -sS https://getcomposer.org/installer | ${INSTALL_DIR}/bin/php -- --install-dir=${INSTALL_DIR}/bin/ --filename=composer
10090

runtime/php-72/php.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ extension=igbinary.so
2424
extension=imagick.so
2525
extension=intl.so
2626
extension=pdo_mysql.so
27-
extension=redis.so
2827
extension=zstd.so
2928
zend_extension=opcache.so
3029

runtime/php-73/Dockerfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,6 @@ RUN set -xe; \
8989
make -j $(nproc); \
9090
make install;
9191

92-
WORKDIR ${REDIS_BUILD_DIR}
93-
RUN set -xe; \
94-
pecl download redis-${VERSION_REDIS_EXTENSION}; \
95-
tar xzf redis-${VERSION_REDIS_EXTENSION}.tgz
96-
WORKDIR ${REDIS_BUILD_DIR}/redis-${VERSION_REDIS_EXTENSION}
97-
RUN set -xe; \
98-
phpize; \
99-
./configure --enable-redis-igbinary --enable-redis-zstd; \
100-
make && make install;
101-
10292
# Install Composer
10393
RUN curl -sS https://getcomposer.org/installer | ${INSTALL_DIR}/bin/php -- --install-dir=${INSTALL_DIR}/bin/ --filename=composer
10494

runtime/php-73/php.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ extension=igbinary.so
2424
extension=imagick.so
2525
extension=intl.so
2626
extension=pdo_mysql.so
27-
extension=redis.so
2827
extension=zstd.so
2928
zend_extension=opcache.so
3029

runtime/php-74/Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ RUN set -xe; \
9898
# Install extensions using pecl
9999
RUN pecl install APCu
100100
RUN pecl install igbinary
101+
RUN pecl install msgpack
101102
RUN pecl install zstd
102103

103104
# Build extensions
@@ -112,15 +113,14 @@ RUN set -xe; \
112113
make -j $(nproc); \
113114
make install;
114115

115-
WORKDIR ${REDIS_BUILD_DIR}
116116
RUN set -xe; \
117-
pecl download redis-${VERSION_REDIS_EXTENSION}; \
118-
tar xzf redis-${VERSION_REDIS_EXTENSION}.tgz
119-
WORKDIR ${REDIS_BUILD_DIR}/redis-${VERSION_REDIS_EXTENSION}
120-
RUN set -xe; \
121-
phpize; \
122-
./configure --enable-redis-igbinary --enable-redis-zstd; \
123-
make && make install;
117+
mkdir -p ${RELAY_BUILD_DIR}; \
118+
curl -L "https://cachewerk.s3.amazonaws.com/relay/v${VERSION_RELAY_EXTENSION}/relay-v${VERSION_RELAY_EXTENSION}-php7.4-centos7-x86-64.tar.gz" \
119+
| tar xzC ${RELAY_BUILD_DIR} --strip-components=1
120+
WORKDIR ${RELAY_BUILD_DIR}/
121+
RUN cp relay.ini $(php-config --ini-dir)/50-relay.ini; \
122+
cp relay-pkg.so $(php-config --extension-dir)/relay.so; \
123+
sed -i "s/BIN:31415926-5358-9793-2384-626433832795/BIN:$(cat /proc/sys/kernel/random/uuid)/" $(php-config --extension-dir)/relay.so;
124124

125125
# Install Composer
126126
RUN curl -sS https://getcomposer.org/installer | ${INSTALL_DIR}/bin/php -- --install-dir=${INSTALL_DIR}/bin/ --filename=composer

runtime/php-74/php.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ extension=apcu.so
2828
extension=igbinary.so
2929
extension=imagick.so
3030
extension=intl.so
31+
extension=msgpack.so
3132
extension=pdo_mysql.so
32-
extension=redis.so
33+
extension=relay.so
3334
extension=zstd.so
3435
zend_extension=opcache.so
3536

runtime/php-80/Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ RUN set -xe; \
9696
# Install extensions using pecl
9797
RUN pecl install APCu
9898
RUN pecl install igbinary
99+
RUN pecl install msgpack
99100
RUN pecl install zstd
100101

101102
# Build extensions
@@ -110,15 +111,14 @@ RUN set -xe; \
110111
make -j $(nproc); \
111112
make install;
112113

113-
WORKDIR ${REDIS_BUILD_DIR}
114114
RUN set -xe; \
115-
pecl download redis-${VERSION_REDIS_EXTENSION}; \
116-
tar xzf redis-${VERSION_REDIS_EXTENSION}.tgz
117-
WORKDIR ${REDIS_BUILD_DIR}/redis-${VERSION_REDIS_EXTENSION}
118-
RUN set -xe; \
119-
phpize; \
120-
./configure --enable-redis-igbinary --enable-redis-zstd; \
121-
make && make install;
115+
mkdir -p ${RELAY_BUILD_DIR}; \
116+
curl -L "https://cachewerk.s3.amazonaws.com/relay/v${VERSION_RELAY_EXTENSION}/relay-v${VERSION_RELAY_EXTENSION}-php8.0-centos7-x86-64.tar.gz" \
117+
| tar xzC ${RELAY_BUILD_DIR} --strip-components=1
118+
WORKDIR ${RELAY_BUILD_DIR}/
119+
RUN cp relay.ini $(php-config --ini-dir)/50-relay.ini; \
120+
cp relay-pkg.so $(php-config --extension-dir)/relay.so; \
121+
sed -i "s/BIN:31415926-5358-9793-2384-626433832795/BIN:$(cat /proc/sys/kernel/random/uuid)/" $(php-config --extension-dir)/relay.so;
122122

123123
# Install Composer
124124
RUN curl -sS https://getcomposer.org/installer | ${INSTALL_DIR}/bin/php -- --install-dir=${INSTALL_DIR}/bin/ --filename=composer

runtime/php-80/php.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ extension=apcu.so
2828
extension=igbinary.so
2929
extension=imagick.so
3030
extension=intl.so
31+
extension=msgpack.so
3132
extension=pdo_mysql.so
32-
extension=redis.so
33+
extension=relay.so
3334
extension=zstd.so
3435
zend_extension=opcache.so
3536

0 commit comments

Comments
 (0)