Skip to content

Commit a565657

Browse files
authored
Compile with igbinary (#2368)
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
1 parent 69c1e4a commit a565657

9 files changed

Lines changed: 109 additions & 26 deletions

File tree

29/apache/Dockerfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,16 @@ RUN set -ex; \
6767
\
6868
# pecl will claim success even if one install fails, so we need to perform each install separately
6969
pecl install APCu-5.1.24; \
70+
pecl install igbinary-3.2.16; \
7071
pecl install imagick-3.7.0; \
71-
pecl install memcached-3.3.0; \
72-
pecl install redis-6.1.0; \
72+
pecl install memcached-3.3.0 \
73+
--configureoptions 'enable-memcached-igbinary="yes"'; \
74+
pecl install redis-6.1.0 \
75+
--configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"'; \
7376
\
7477
docker-php-ext-enable \
7578
apcu \
79+
igbinary \
7680
imagick \
7781
memcached \
7882
redis \
@@ -108,6 +112,11 @@ RUN { \
108112
\
109113
echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \
110114
\
115+
{ \
116+
echo 'apc.serializer=igbinary'; \
117+
echo 'session.serialize_handler=igbinary'; \
118+
} >> "${PHP_INI_DIR}/conf.d/docker-php-ext-igbinary.ini"; \
119+
\
111120
{ \
112121
echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \
113122
echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \

29/fpm-alpine/Dockerfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,16 @@ RUN set -ex; \
6464
\
6565
# pecl will claim success even if one install fails, so we need to perform each install separately
6666
pecl install APCu-5.1.24; \
67+
pecl install igbinary-3.2.16; \
6768
pecl install imagick-3.7.0; \
68-
pecl install memcached-3.3.0; \
69-
pecl install redis-6.1.0; \
69+
pecl install memcached-3.3.0 \
70+
--configureoptions 'enable-memcached-igbinary="yes"'; \
71+
pecl install redis-6.1.0 \
72+
--configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"'; \
7073
\
7174
docker-php-ext-enable \
7275
apcu \
76+
igbinary \
7377
imagick \
7478
memcached \
7579
redis \
@@ -103,6 +107,11 @@ RUN { \
103107
\
104108
echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \
105109
\
110+
{ \
111+
echo 'apc.serializer=igbinary'; \
112+
echo 'session.serialize_handler=igbinary'; \
113+
} >> "${PHP_INI_DIR}/conf.d/docker-php-ext-igbinary.ini"; \
114+
\
106115
{ \
107116
echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \
108117
echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \

29/fpm/Dockerfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,16 @@ RUN set -ex; \
6767
\
6868
# pecl will claim success even if one install fails, so we need to perform each install separately
6969
pecl install APCu-5.1.24; \
70+
pecl install igbinary-3.2.16; \
7071
pecl install imagick-3.7.0; \
71-
pecl install memcached-3.3.0; \
72-
pecl install redis-6.1.0; \
72+
pecl install memcached-3.3.0 \
73+
--configureoptions 'enable-memcached-igbinary="yes"'; \
74+
pecl install redis-6.1.0 \
75+
--configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"'; \
7376
\
7477
docker-php-ext-enable \
7578
apcu \
79+
igbinary \
7680
imagick \
7781
memcached \
7882
redis \
@@ -108,6 +112,11 @@ RUN { \
108112
\
109113
echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \
110114
\
115+
{ \
116+
echo 'apc.serializer=igbinary'; \
117+
echo 'session.serialize_handler=igbinary'; \
118+
} >> "${PHP_INI_DIR}/conf.d/docker-php-ext-igbinary.ini"; \
119+
\
111120
{ \
112121
echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \
113122
echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \

30/apache/Dockerfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,16 @@ RUN set -ex; \
6767
\
6868
# pecl will claim success even if one install fails, so we need to perform each install separately
6969
pecl install APCu-5.1.24; \
70+
pecl install igbinary-3.2.16; \
7071
pecl install imagick-3.7.0; \
71-
pecl install memcached-3.3.0; \
72-
pecl install redis-6.1.0; \
72+
pecl install memcached-3.3.0 \
73+
--configureoptions 'enable-memcached-igbinary="yes"'; \
74+
pecl install redis-6.1.0 \
75+
--configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"'; \
7376
\
7477
docker-php-ext-enable \
7578
apcu \
79+
igbinary \
7680
imagick \
7781
memcached \
7882
redis \
@@ -108,6 +112,11 @@ RUN { \
108112
\
109113
echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \
110114
\
115+
{ \
116+
echo 'apc.serializer=igbinary'; \
117+
echo 'session.serialize_handler=igbinary'; \
118+
} >> "${PHP_INI_DIR}/conf.d/docker-php-ext-igbinary.ini"; \
119+
\
111120
{ \
112121
echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \
113122
echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \

30/fpm-alpine/Dockerfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,16 @@ RUN set -ex; \
6464
\
6565
# pecl will claim success even if one install fails, so we need to perform each install separately
6666
pecl install APCu-5.1.24; \
67+
pecl install igbinary-3.2.16; \
6768
pecl install imagick-3.7.0; \
68-
pecl install memcached-3.3.0; \
69-
pecl install redis-6.1.0; \
69+
pecl install memcached-3.3.0 \
70+
--configureoptions 'enable-memcached-igbinary="yes"'; \
71+
pecl install redis-6.1.0 \
72+
--configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"'; \
7073
\
7174
docker-php-ext-enable \
7275
apcu \
76+
igbinary \
7377
imagick \
7478
memcached \
7579
redis \
@@ -103,6 +107,11 @@ RUN { \
103107
\
104108
echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \
105109
\
110+
{ \
111+
echo 'apc.serializer=igbinary'; \
112+
echo 'session.serialize_handler=igbinary'; \
113+
} >> "${PHP_INI_DIR}/conf.d/docker-php-ext-igbinary.ini"; \
114+
\
106115
{ \
107116
echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \
108117
echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \

30/fpm/Dockerfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,16 @@ RUN set -ex; \
6767
\
6868
# pecl will claim success even if one install fails, so we need to perform each install separately
6969
pecl install APCu-5.1.24; \
70+
pecl install igbinary-3.2.16; \
7071
pecl install imagick-3.7.0; \
71-
pecl install memcached-3.3.0; \
72-
pecl install redis-6.1.0; \
72+
pecl install memcached-3.3.0 \
73+
--configureoptions 'enable-memcached-igbinary="yes"'; \
74+
pecl install redis-6.1.0 \
75+
--configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"'; \
7376
\
7477
docker-php-ext-enable \
7578
apcu \
79+
igbinary \
7680
imagick \
7781
memcached \
7882
redis \
@@ -108,6 +112,11 @@ RUN { \
108112
\
109113
echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \
110114
\
115+
{ \
116+
echo 'apc.serializer=igbinary'; \
117+
echo 'session.serialize_handler=igbinary'; \
118+
} >> "${PHP_INI_DIR}/conf.d/docker-php-ext-igbinary.ini"; \
119+
\
111120
{ \
112121
echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \
113122
echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \

Dockerfile-alpine.template

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,16 @@ RUN set -ex; \
6363
\
6464
# pecl will claim success even if one install fails, so we need to perform each install separately
6565
pecl install APCu-%%APCU_VERSION%%; \
66+
pecl install igbinary-%%IGBINARY_VERSION%%; \
6667
pecl install imagick-%%IMAGICK_VERSION%%; \
67-
pecl install memcached-%%MEMCACHED_VERSION%%; \
68-
pecl install redis-%%REDIS_VERSION%%; \
68+
pecl install memcached-%%MEMCACHED_VERSION%% \
69+
--configureoptions 'enable-memcached-igbinary="yes"'; \
70+
pecl install redis-%%REDIS_VERSION%% \
71+
--configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"'; \
6972
\
7073
docker-php-ext-enable \
7174
apcu \
75+
igbinary \
7276
imagick \
7377
memcached \
7478
redis \
@@ -102,6 +106,11 @@ RUN { \
102106
\
103107
echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \
104108
\
109+
{ \
110+
echo 'apc.serializer=igbinary'; \
111+
echo 'session.serialize_handler=igbinary'; \
112+
} >> "${PHP_INI_DIR}/conf.d/docker-php-ext-igbinary.ini"; \
113+
\
105114
{ \
106115
echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \
107116
echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \

Dockerfile-debian.template

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,16 @@ RUN set -ex; \
6666
\
6767
# pecl will claim success even if one install fails, so we need to perform each install separately
6868
pecl install APCu-%%APCU_VERSION%%; \
69+
pecl install igbinary-%%IGBINARY_VERSION%%; \
6970
pecl install imagick-%%IMAGICK_VERSION%%; \
70-
pecl install memcached-%%MEMCACHED_VERSION%%; \
71-
pecl install redis-%%REDIS_VERSION%%; \
71+
pecl install memcached-%%MEMCACHED_VERSION%% \
72+
--configureoptions 'enable-memcached-igbinary="yes"'; \
73+
pecl install redis-%%REDIS_VERSION%% \
74+
--configureoptions 'enable-redis-igbinary="yes" enable-redis-zstd="yes" enable-redis-lz4="yes"'; \
7275
\
7376
docker-php-ext-enable \
7477
apcu \
78+
igbinary \
7579
imagick \
7680
memcached \
7781
redis \
@@ -107,6 +111,11 @@ RUN { \
107111
\
108112
echo 'apc.enable_cli=1' >> "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"; \
109113
\
114+
{ \
115+
echo 'apc.serializer=igbinary'; \
116+
echo 'session.serialize_handler=igbinary'; \
117+
} >> "${PHP_INI_DIR}/conf.d/docker-php-ext-igbinary.ini"; \
118+
\
110119
{ \
111120
echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \
112121
echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \

update.sh

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,35 @@ apcu_version="$(
4444
| tail -1
4545
)"
4646

47-
memcached_version="$(
48-
git ls-remote --tags https://github.com/php-memcached-dev/php-memcached.git \
47+
igbinary_version="$(
48+
git ls-remote --tags https://github.com/igbinary/igbinary.git \
4949
| cut -d/ -f3 \
50-
| grep -viE -- 'rc|b' \
51-
| sed -E 's/^[rv]//' \
50+
| grep -viE '[a-z]' \
51+
| tr -d '^{}' \
5252
| sort -V \
5353
| tail -1
5454
)"
5555

56-
redis_version="$(
57-
git ls-remote --tags https://github.com/phpredis/phpredis.git \
56+
imagick_version="$(
57+
git ls-remote --tags https://github.com/mkoppanen/imagick.git \
5858
| cut -d/ -f3 \
5959
| grep -viE '[a-z]' \
6060
| tr -d '^{}' \
6161
| sort -V \
6262
| tail -1
6363
)"
6464

65-
imagick_version="$(
66-
git ls-remote --tags https://github.com/mkoppanen/imagick.git \
65+
memcached_version="$(
66+
git ls-remote --tags https://github.com/php-memcached-dev/php-memcached.git \
67+
| cut -d/ -f3 \
68+
| grep -viE -- 'rc|b' \
69+
| sed -E 's/^[rv]//' \
70+
| sort -V \
71+
| tail -1
72+
)"
73+
74+
redis_version="$(
75+
git ls-remote --tags https://github.com/phpredis/phpredis.git \
6776
| cut -d/ -f3 \
6877
| grep -viE '[a-z]' \
6978
| tr -d '^{}' \
@@ -73,9 +82,10 @@ imagick_version="$(
7382

7483
declare -A pecl_versions=(
7584
[APCu]="$apcu_version"
85+
[igbinary]="$igbinary_version"
86+
[imagick]="$imagick_version"
7687
[memcached]="$memcached_version"
7788
[redis]="$redis_version"
78-
[imagick]="$imagick_version"
7989
)
8090

8191
variants=(
@@ -121,9 +131,10 @@ function create_variant() {
121131
s/%%CMD%%/'"${cmd[$variant]}"'/g;
122132
s|%%VARIANT_EXTRAS%%|'"${extras[$variant]}"'|g;
123133
s/%%APCU_VERSION%%/'"${pecl_versions[APCu]}"'/g;
134+
s/%%IGBINARY_VERSION%%/'"${pecl_versions[igbinary]}"'/g;
135+
s/%%IMAGICK_VERSION%%/'"${pecl_versions[imagick]}"'/g;
124136
s/%%MEMCACHED_VERSION%%/'"${pecl_versions[memcached]}"'/g;
125137
s/%%REDIS_VERSION%%/'"${pecl_versions[redis]}"'/g;
126-
s/%%IMAGICK_VERSION%%/'"${pecl_versions[imagick]}"'/g;
127138
s/%%CRONTAB_INT%%/'"$crontabInt"'/g;
128139
' "$dir/Dockerfile"
129140

0 commit comments

Comments
 (0)