github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/examples/php-fpm/php/Dockerfile (about)

     1  FROM php:8.1-fpm-alpine
     2  
     3  RUN apk add binutils
     4  
     5  WORKDIR /var/www/html
     6  
     7  COPY --from=pyroscope/pyroscope:latest /usr/bin/pyroscope /usr/bin/pyroscope
     8  COPY php/index.php ./index.php
     9  
    10  ENV PYROSCOPE_APPLICATION_NAME=simple.php.app
    11  ENV PYROSCOPE_SERVER_ADDRESS=http://pyroscope:4040/
    12  ENV PYROSCOPE_LOG_LEVEL=debug
    13  
    14  RUN adduser --disabled-password --gecos --quiet pyroscope
    15  USER pyroscope
    16  
    17  CMD ["pyroscope", "exec", "-spy-name", "phpspy", "php-fpm"]