Skip to content

Commit 02212e3

Browse files
authored
Merge pull request #1364 from infosiftr/debug
Add template support for "--enable-debug" flag
2 parents d0255e6 + 272a222 commit 02212e3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Dockerfile-linux.template

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,18 @@ RUN set -eux; \
385385
{{ if [ "8.1", "8.2" ] | index(env.version | rtrimstr("-rc")) then ( -}}
386386
--enable-zend-max-execution-timers \
387387
{{ ) else "" end -}}
388+
{{ ) else "" end -}}
389+
{{ if env.DOCKER_PHP_ENABLE_DEBUG then ( -}}
390+
{{ # 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 -}}
391+
{{ # example usage to regenerate Dockerfiles with debug enabled: "DOCKER_PHP_ENABLE_DEBUG=1 ./apply-templates" -}}
392+
--enable-debug \
388393
{{ ) else "" end -}}
389394
; \
390395
make -j "$(nproc)"; \
391396
find -type f -name '*.a' -delete; \
392397
make install; \
398+
{{ if env.DOCKER_PHP_ENABLE_DEBUG then "" else ( -}}
399+
{{ # DOCKER_PHP_ENABLE_DEBUG is not used by official-images -}}
393400
find \
394401
/usr/local \
395402
-type f \
@@ -398,6 +405,7 @@ RUN set -eux; \
398405
strip --strip-all "$@" || : \
399406
' -- '{}' + \
400407
; \
408+
{{ ) end -}}
401409
make clean; \
402410
\
403411
# https://github.com/docker-library/php/issues/692 (copy default example "php.ini" files somewhere easily discoverable)

0 commit comments

Comments
 (0)