From b292e0808aed79ebea9ab0871f02ad0dcf2c13b9 Mon Sep 17 00:00:00 2001 From: Matthias Vanooteghem Date: Wed, 4 Jan 2023 16:41:22 +0100 Subject: [PATCH] fix issue tokenizer ext not building in Laravel Horizon Dockerfile for PHP 8.2 --- laravel-horizon/Dockerfile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/laravel-horizon/Dockerfile b/laravel-horizon/Dockerfile index e35f8b06..1d262082 100644 --- a/laravel-horizon/Dockerfile +++ b/laravel-horizon/Dockerfile @@ -37,12 +37,13 @@ RUN apk --update add wget \ procps RUN pecl channel-update pecl.php.net; \ - docker-php-ext-install mysqli mbstring pdo pdo_mysql xml pcntl; \ - if [ $(php -r "echo PHP_MAJOR_VERSION;") = "8" ] && [ $(php -r "echo PHP_MINOR_VERSION;") = "1" ]; then \ - php -m | grep -q 'tokenizer'; \ - else \ - docker-php-ext-install tokenizer; \ - fi + docker-php-ext-install mysqli mbstring pdo pdo_mysql xml pcntl; \ + if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "80100" ] || \ + [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "80200" ]; then \ + php -m | grep -oiE '^tokenizer$'; \ + else \ + docker-php-ext-install tokenizer; \ + fi # Add a non-root user to help install ffmpeg: ARG PUID=1000