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
This commit is contained in:
蔡正海 2019-07-30 12:47:43 +08:00 committed by Shao Yu-Lung (Allen)
parent 58d1eb876e
commit 51c6d3549c
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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:
###########################################################################