Skip to content

Commit

Permalink
Install Blackfire PHP agent by default
Browse files Browse the repository at this point in the history
Only for modern PHP versions
  • Loading branch information
wireblue committed Sep 5, 2023
1 parent 1e9fd81 commit 8c52229
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions php/81/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ RUN echo "alias artisan='php artisan'" >> /home/${CUSTOM_USER_NAME}/.zshrc \
&& echo "alias magento='php bin/magento'" >> /home/${CUSTOM_USER_NAME}/.zshrc

# Install Blackfire
# RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
# && architecture=$(uname -m) \
# && curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version \
# && mkdir -p /tmp/blackfire \
# && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
# && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \
# && printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8307\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
# && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
&& architecture=$(uname -m) \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version \
&& mkdir -p /tmp/blackfire \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8307\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz

# Run the user specified commands
ARG EXTRA_CMDS="echo 'None to run'"
Expand Down
16 changes: 8 additions & 8 deletions php/82/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ RUN echo "alias artisan='php artisan'" >> /home/${CUSTOM_USER_NAME}/.zshrc \
&& echo "alias magento='php bin/magento'" >> /home/${CUSTOM_USER_NAME}/.zshrc

# Install Blackfire
# RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
# && architecture=$(uname -m) \
# && curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version \
# && mkdir -p /tmp/blackfire \
# && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
# && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \
# && printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8307\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
# && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
&& architecture=$(uname -m) \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version \
&& mkdir -p /tmp/blackfire \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8307\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz

# Run the user specified commands
ARG EXTRA_CMDS="echo 'None to run'"
Expand Down

0 comments on commit 8c52229

Please sign in to comment.