From 51c6d3549ccffa8f813ac3d7ed727ca0711bd47a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=94=A1=E6=AD=A3=E6=B5=B7?= Date: Tue, 30 Jul 2019 12:47:43 +0800 Subject: [PATCH] fix: fix install xhprof error (#2141) * feat: Add PHP_FPM_INSTALL_XHPROF as an option to install xhprof extension * fix: INSTALL_XHPROF default value set false * fix: install xhprof error * fix: nginx build * fix: when INSTALL_XHPROF = false, rm xhprof.ini --- docker-compose.yml | 1 + php-fpm/Dockerfile | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6773264..00377e9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -189,6 +189,7 @@ services: - INSTALL_SSHPASS=${PHP_FPM_INSTALL_SSHPASS} - ADDITIONAL_LOCALES=${PHP_FPM_ADDITIONAL_LOCALES} - INSTALL_FFMPEG=${PHP_FPM_FFMPEG} + - INSTALL_XHPROF=${PHP_FPM_INSTALL_XHPROF} - http_proxy - https_proxy - no_proxy diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index a25e5f4..68a1933 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -263,7 +263,7 @@ ARG INSTALL_XHPROF=false RUN if [ ${INSTALL_XHPROF} = true ]; then \ # Install the php xhprof extension if [ $(php -r "echo PHP_MAJOR_VERSION;") = 7 ]; then \ - curl -L -o /tmp/xhprof.tar.gz "https://github.com/tideways/php-xhprof-extension/archive/v4.1.6.tar.gz"; \ + curl -L -o /tmp/xhprof.tar.gz "https://github.com/tideways/php-xhprof-extension/archive/v4.1.7.tar.gz"; \ else \ curl -L -o /tmp/xhprof.tar.gz "https://codeload.github.com/phacility/xhprof/tar.gz/master"; \ fi \ @@ -282,6 +282,10 @@ RUN if [ ${INSTALL_XHPROF} = true ]; then \ COPY ./xhprof.ini /usr/local/etc/php/conf.d +RUN if [ ${INSTALL_XHPROF} = false ]; then \ + rm /usr/local/etc/php/conf.d/xhprof.ini \ +;fi + ########################################################################### # AMQP: ###########################################################################