Merge pull request #3340 from oozone/fix-laravel-horizon-tokenizer-php-version

Fix Laravel Horizon container not building due to tokenizer in Dockerfile for PHP 8.2
This commit is contained in:
Shao Yu-Lung (Allen) 2023-03-30 07:56:51 +08:00 committed by GitHub
commit e69c4f0e38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,8 +38,9 @@ RUN apk --update add wget \
RUN pecl channel-update pecl.php.net; \ RUN pecl channel-update pecl.php.net; \
docker-php-ext-install mysqli mbstring pdo pdo_mysql 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 \ if [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "80100" ] || \
php -m | grep -q 'tokenizer'; \ [ $(php -r "echo PHP_VERSION_ID - PHP_RELEASE_VERSION;") = "80200" ]; then \
php -m | grep -oiE '^tokenizer$'; \
else \ else \
docker-php-ext-install tokenizer; \ docker-php-ext-install tokenizer; \
fi fi