File tree 4 files changed +15
-12
lines changed
4 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ variable "IMAGE_VERSION_SUFFIX" {
17
17
variable "DOCKER_PLATFORM" {
18
18
default = " linux/amd64"
19
19
}
20
- variable "ENABLE_ZTS " {
20
+ variable "PHP_COMPILATION_FLAGS " {
21
21
default = " "
22
22
}
23
23
@@ -27,7 +27,7 @@ target "build-php" {
27
27
tags = [" bref/${ CPU_PREFIX } build-php-${ PHP_VERSION } " ]
28
28
args = {
29
29
" IMAGE_VERSION_SUFFIX" = " ${ IMAGE_VERSION_SUFFIX } "
30
- " ENABLE_ZTS " = " ${ ENABLE_ZTS } "
30
+ " PHP_COMPILATION_FLAGS " = " ${ PHP_COMPILATION_FLAGS } "
31
31
}
32
32
platforms = [" ${ DOCKER_PLATFORM } " ]
33
33
}
@@ -38,7 +38,7 @@ target "php" {
38
38
tags = [" bref/${ CPU_PREFIX } php-${ PHP_VERSION } " ]
39
39
args = {
40
40
" IMAGE_VERSION_SUFFIX" = " ${ IMAGE_VERSION_SUFFIX } "
41
- " ENABLE_ZTS " = " ${ ENABLE_ZTS } "
41
+ " PHP_COMPILATION_FLAGS " = " ${ PHP_COMPILATION_FLAGS } "
42
42
}
43
43
contexts = {
44
44
" bref/${CPU_PREFIX}build-php-${PHP_VERSION}" = " target:build-php"
Original file line number Diff line number Diff line change @@ -364,7 +364,7 @@ RUN curl --location --silent --show-error --fail https://www.php.net/get/php-${V
364
364
# --enable-ftp: because ftp_ssl_connect() needs ftp to be compiled statically (see https://github.com/docker-library/php/issues/236)
365
365
# --enable-mbstring: because otherwise there's no way to get pecl to use it properly (see https://github.com/docker-library/php/issues/195)
366
366
# --with-zlib and --with-zlib-dir: See https://stackoverflow.com/a/42978649/245552
367
- ARG ENABLE_ZTS
367
+ ARG PHP_COMPILATION_FLAGS
368
368
RUN ./buildconf --force
369
369
RUN CFLAGS="-fstack-protector-strong -fpic -fpie -O3 -I${INSTALL_DIR}/include -I/usr/include -ffunction-sections -fdata-sections" \
370
370
CPPFLAGS="-fstack-protector-strong -fpic -fpie -O3 -I${INSTALL_DIR}/include -I/usr/include -ffunction-sections -fdata-sections" \
@@ -378,7 +378,6 @@ RUN CFLAGS="-fstack-protector-strong -fpic -fpie -O3 -I${INSTALL_DIR}/include -I
378
378
--enable-fpm \
379
379
--disable-cgi \
380
380
--enable-cli \
381
- ${ENABLE_ZTS} \
382
381
--disable-phpdbg \
383
382
--with-sodium \
384
383
--with-readline \
@@ -400,7 +399,9 @@ RUN CFLAGS="-fstack-protector-strong -fpic -fpie -O3 -I${INSTALL_DIR}/include -I
400
399
--enable-soap \
401
400
--with-xsl=${INSTALL_DIR} \
402
401
# necessary for `pecl` to work (to install PHP extensions)
403
- --with-pear
402
+ --with-pear \
403
+ # extra compilation flags
404
+ ${PHP_COMPILATION_FLAGS}
404
405
RUN make -j $(nproc)
405
406
# Run `make install` and override PEAR's PHAR URL because pear.php.net is down
406
407
RUN set -xe; \
Original file line number Diff line number Diff line change @@ -364,7 +364,7 @@ RUN curl --location --silent --show-error --fail https://www.php.net/get/php-${V
364
364
# --enable-ftp: because ftp_ssl_connect() needs ftp to be compiled statically (see https://github.com/docker-library/php/issues/236)
365
365
# --enable-mbstring: because otherwise there's no way to get pecl to use it properly (see https://github.com/docker-library/php/issues/195)
366
366
# --with-zlib and --with-zlib-dir: See https://stackoverflow.com/a/42978649/245552
367
- ARG ENABLE_ZTS
367
+ ARG PHP_COMPILATION_FLAGS
368
368
RUN ./buildconf --force
369
369
RUN CFLAGS="-fstack-protector-strong -fpic -fpie -O3 -I${INSTALL_DIR}/include -I/usr/include -ffunction-sections -fdata-sections" \
370
370
CPPFLAGS="-fstack-protector-strong -fpic -fpie -O3 -I${INSTALL_DIR}/include -I/usr/include -ffunction-sections -fdata-sections" \
@@ -378,7 +378,6 @@ RUN CFLAGS="-fstack-protector-strong -fpic -fpie -O3 -I${INSTALL_DIR}/include -I
378
378
--enable-fpm \
379
379
--disable-cgi \
380
380
--enable-cli \
381
- ${ENABLE_ZTS} \
382
381
--disable-phpdbg \
383
382
--with-sodium \
384
383
--with-readline \
@@ -400,7 +399,9 @@ RUN CFLAGS="-fstack-protector-strong -fpic -fpie -O3 -I${INSTALL_DIR}/include -I
400
399
--enable-soap \
401
400
--with-xsl=${INSTALL_DIR} \
402
401
# necessary for `pecl` to work (to install PHP extensions)
403
- --with-pear
402
+ --with-pear \
403
+ # extra compilation flags
404
+ ${PHP_COMPILATION_FLAGS}
404
405
RUN make -j $(nproc)
405
406
# Run `make install` and override PEAR's PHAR URL because pear.php.net is down
406
407
RUN set -xe; \
Original file line number Diff line number Diff line change @@ -364,7 +364,7 @@ RUN curl --location --silent --show-error --fail https://www.php.net/get/php-${V
364
364
# --enable-ftp: because ftp_ssl_connect() needs ftp to be compiled statically (see https://github.com/docker-library/php/issues/236)
365
365
# --enable-mbstring: because otherwise there's no way to get pecl to use it properly (see https://github.com/docker-library/php/issues/195)
366
366
# --with-zlib and --with-zlib-dir: See https://stackoverflow.com/a/42978649/245552
367
- ARG ENABLE_ZTS
367
+ ARG PHP_COMPILATION_FLAGS
368
368
RUN ./buildconf --force
369
369
RUN CFLAGS="-fstack-protector-strong -fpic -fpie -O3 -I${INSTALL_DIR}/include -I/usr/include -ffunction-sections -fdata-sections" \
370
370
CPPFLAGS="-fstack-protector-strong -fpic -fpie -O3 -I${INSTALL_DIR}/include -I/usr/include -ffunction-sections -fdata-sections" \
@@ -378,7 +378,6 @@ RUN CFLAGS="-fstack-protector-strong -fpic -fpie -O3 -I${INSTALL_DIR}/include -I
378
378
--enable-fpm \
379
379
--disable-cgi \
380
380
--enable-cli \
381
- ${ENABLE_ZTS} \
382
381
--disable-phpdbg \
383
382
--with-sodium \
384
383
--with-readline \
@@ -400,7 +399,9 @@ RUN CFLAGS="-fstack-protector-strong -fpic -fpie -O3 -I${INSTALL_DIR}/include -I
400
399
--enable-soap \
401
400
--with-xsl=${INSTALL_DIR} \
402
401
# necessary for `pecl` to work (to install PHP extensions)
403
- --with-pear
402
+ --with-pear \
403
+ # extra compilation flags
404
+ ${PHP_COMPILATION_FLAGS}
404
405
RUN make -j $(nproc)
405
406
# Run `make install` and override PEAR's PHAR URL because pear.php.net is down
406
407
RUN set -xe; \
You can’t perform that action at this time.
0 commit comments