Skip to content

Commit

Permalink
fix: install blackfire probe in image
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Sep 20, 2024
1 parent dd59ab5 commit 73ac1e3
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 18 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ All [tags in the `prestashop/prestashop` repository](https://api.github.com/repo
- 8.1
- 8.2

### Testing

To build the image, pass the following environment variables when building:

```shell
PS_VERSION=8.1.0 PHP_VERSION=8.2 docker compose build prestashop
```

## shopware

[View on GitHub Container Registry 📦](https://ghcr.io/myparcelnl/shopware)
Expand All @@ -57,6 +65,14 @@ Shopware images based on `php-xd`.
- 8.2
- 8.1

### Testing

To build the image, pass the following environment variables when building:

```shell
SW_VERSION=6.5 PHP_VERSION=7.4 docker compose build shopware
```

## wordpress

[View on GitHub Container Registry 📦](https://ghcr.io/myparcelnl/wordpress)
Expand All @@ -73,3 +89,11 @@ All versions returned by [the WordPress API](https://api.wordpress.org/core/vers

- 7.4
- 8.2

### Testing

To build the image, pass the following environment variables when building:

```shell
WP_VERSION=6.5.3 PHP_VERSION=7.4 docker compose build wordpress
```
37 changes: 22 additions & 15 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
services:
###
# Main php container
#
# This container runs the php-fpm process and serves WordPress.
#
# Requires the db container to be running.
#
# Contains:
# - php-fpm, xdebug, composer
# - WordPress installation (in volume web-data)
# - Various tools: zsh, vim
#
# See https://github.com/myparcelnl/docker-images/pkgs/container/wordpress
##
wordpress:
image: ghcr.io/myparcelnl/wordpress:6.3-php7.4
image: ghcr.io/myparcelnl/wordpress:${WP_VERSION}-php${PHP_VERSION}
build:
context: images/wordpress
dockerfile: Dockerfile
args:
PHP_VERSION: ${PHP_VERSION}
WP_VERSION: ${WP_VERSION}

prestashop:
image: ghcr.io/myparcelnl/prestashop:${PS_VERSION}-php${PHP_VERSION}
build:
context: images/prestashop
dockerfile: Dockerfile
args:
PHP_VERSION: ${PHP_VERSION}
PS_VERSION: ${PS_VERSION}

shopware:
image: ghcr.io/myparcelnl/shopware:${SW_VERSION}-php${PHP_VERSION}
build:
context: images/shopware
dockerfile: Dockerfile
args:
PHP_VERSION: ${PHP_VERSION}
SW_VERSION: ${SW_VERSION}
3 changes: 2 additions & 1 deletion images/prestashop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ RUN version="$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;")" && \
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 "blackfire.agent_socket=tcp://blackfire:8307\n" > "$PHP_INI_DIR/conf.d/blackfire.ini" && \
rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz && \
blackfire php:install

ENV XDEBUG_MODE=debug

Expand Down
3 changes: 2 additions & 1 deletion images/shopware/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ RUN version="$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;")" \
curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s "https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version" && \
tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire && \
mv /tmp/blackfire/blackfire-*.so "$(php -r "echo ini_get ('extension_dir');")/blackfire.so" && \
rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz && \
blackfire php:install

# add utilities
RUN apk add --no-cache \
Expand Down
3 changes: 2 additions & 1 deletion images/wordpress/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ RUN apk add --no-cache \
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 "blackfire.agent_socket=tcp://blackfire:8307\n" > "$PHP_INI_DIR/conf.d/blackfire.ini" && \
rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz && \
blackfire php:install

ENV XDEBUG_MODE=debug

Expand Down

0 comments on commit 73ac1e3

Please sign in to comment.