Merge pull request #1364 from infosiftr/debug

Add template support for "--enable-debug" flag
This commit is contained in:
Tianon Gravi
2023-12-20 12:23:18 -08:00
committed by GitHub

View File

@ -385,11 +385,18 @@ RUN set -eux; \
{{ if [ "8.1", "8.2" ] | index(env.version | rtrimstr("-rc")) then ( -}} {{ if [ "8.1", "8.2" ] | index(env.version | rtrimstr("-rc")) then ( -}}
--enable-zend-max-execution-timers \ --enable-zend-max-execution-timers \
{{ ) else "" end -}} {{ ) else "" end -}}
{{ ) else "" end -}}
{{ if env.DOCKER_PHP_ENABLE_DEBUG then ( -}}
{{ # DOCKER_PHP_ENABLE_DEBUG is not used or supported by official-images; this is for users who want to build their own php image with debug enabled -}}
{{ # example usage to regenerate Dockerfiles with debug enabled: "DOCKER_PHP_ENABLE_DEBUG=1 ./apply-templates" -}}
--enable-debug \
{{ ) else "" end -}} {{ ) else "" end -}}
; \ ; \
make -j "$(nproc)"; \ make -j "$(nproc)"; \
find -type f -name '*.a' -delete; \ find -type f -name '*.a' -delete; \
make install; \ make install; \
{{ if env.DOCKER_PHP_ENABLE_DEBUG then "" else ( -}}
{{ # DOCKER_PHP_ENABLE_DEBUG is not used by official-images -}}
find \ find \
/usr/local \ /usr/local \
-type f \ -type f \
@ -398,6 +405,7 @@ RUN set -eux; \
strip --strip-all "$@" || : \ strip --strip-all "$@" || : \
' -- '{}' + \ ' -- '{}' + \
; \ ; \
{{ ) end -}}
make clean; \ make clean; \
\ \
# https://github.com/docker-library/php/issues/692 (copy default example "php.ini" files somewhere easily discoverable) # https://github.com/docker-library/php/issues/692 (copy default example "php.ini" files somewhere easily discoverable)