31 wiersze
1.1 KiB
Plaintext
31 wiersze
1.1 KiB
Plaintext
FROM php:7.4-fpm-alpine
|
|
|
|
# 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 && \
|
|
tar xf ./php-xhprof-extension.tar.gz && \
|
|
cd php-xhprof-extension-5.0.2 && \
|
|
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
|
|
|
|
# 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
|