瀏覽代碼

fix #1535 xdebug installation fails when php version is 5.6

bestlong 7 年之前
父節點
當前提交
97adef735a
共有 1 個文件被更改,包括 7 次插入3 次删除
  1. 7 3
      php-fpm/Dockerfile

+ 7 - 3
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