Skip to content

Commit 80a79da

Browse files
committed
add blackfire extension to development container
1 parent eded888 commit 80a79da

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

layers/fpm-dev/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ FROM $LAYER_IMAGE
44
# Override the config so that PHP-FPM listens on port 9000
55
COPY php-fpm.conf /opt/bref/etc/php-fpm.conf
66

7+
USER root
8+
ENV current_os=linux
9+
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;")-zts \
10+
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/$current_os/amd64/$version \
11+
&& mkdir -p /tmp/blackfire \
12+
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
13+
&& cp /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
14+
&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
15+
16+
# Build the final image from the lambci image that is close to the production environment
17+
FROM lambci/lambda:provided
18+
19+
COPY --from=0 /opt /opt
20+
721
EXPOSE 9000
822

923
# Clear the parent entrypoint

0 commit comments

Comments
 (0)