From ddd06fecfd75cfc34d8e1e1189da5e4baba49944 Mon Sep 17 00:00:00 2001 From: Tom Robertshaw Date: Sat, 19 Mar 2022 16:58:35 +0000 Subject: [PATCH] Do not install tokenizer into laravel-worker when php version is 8.1 --- laravel-horizon/Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/laravel-horizon/Dockerfile b/laravel-horizon/Dockerfile index 0401b38..49311f6 100644 --- a/laravel-horizon/Dockerfile +++ b/laravel-horizon/Dockerfile @@ -37,7 +37,12 @@ RUN apk --update add wget \ procps RUN pecl channel-update pecl.php.net; \ - docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl + 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 # Add a non-root user to help install ffmpeg: ARG PUID=1000