docker-volume-borg-backup/docker-xhprof-xhgui/Dockerfile-php-app

31 wiersze
1.1 KiB
Plaintext
Czysty Zwykły widok Historia

FROM php:7.4-fpm-alpine
2019-07-09 14:27:13 +00:00
# php configuration
COPY php.ini /usr/local/etc/php/
# install the xhprof extension to profile requests
RUN curl "https://github.com/tideways/php-xhprof-extension/archive/v5.0.2.tar.gz" -fsL -o ./php-xhprof-extension.tar.gz && \
2019-07-09 14:27:13 +00:00
tar xf ./php-xhprof-extension.tar.gz && \
cd php-xhprof-extension-5.0.2 && \
2019-07-09 14:27:13 +00:00
apk add --update --no-cache build-base autoconf && \
phpize && \
./configure && \
make && \
make install
RUN rm -rf ./php-xhprof-extension.tar.gz ./php-xhprof-extension-5.0.2
RUN docker-php-ext-enable tideways_xhprof
2019-07-09 14:27:13 +00:00
# install mongodb extension. The xhgui-collector will send xprof data to mongo
RUN apk add --no-cache autoconf alpine-sdk
RUN pecl install mongodb && docker-php-ext-enable mongodb
# install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# install the package that will collect data
WORKDIR /var/xhgui
RUN composer require perftools/php-profiler perftools/xhgui-collector alcaeus/mongo-php-adapter
# copy the configuration file
COPY xhgui_config.php /var/xhgui/config/config.php