From 97adef735ad973497e56c85b12d32438b6377126 Mon Sep 17 00:00:00 2001 From: bestlong Date: Sat, 26 May 2018 07:32:33 +0800 Subject: [PATCH] fix #1535 xdebug installation fails when php version is 5.6 --- php-fpm/Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index c062f424..afd24a43 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -85,9 +85,13 @@ RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \ ARG INSTALL_XDEBUG=false RUN if [ ${INSTALL_XDEBUG} = true ]; then \ - # Install the xdebug extension - pecl install xdebug && \ - docker-php-ext-enable xdebug \ + # Install the xdebug extension + if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ + pecl install xdebug-2.5.5; \ + else \ + pecl install xdebug; \ + fi && \ + docker-php-ext-enable xdebug \ ;fi # Copy xdebug configuration for remote debugging