fix issue tokenizer ext not building in Laravel Horizon Dockerfile for PHP 8.2

This commit is contained in:
Matthias Vanooteghem 2023-01-04 16:41:22 +01:00
parent 6c8cb6dd85
commit b292e0808a

View File

@ -37,12 +37,13 @@ RUN apk --update add wget \
procps procps
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 \
else \ php -m | grep -oiE '^tokenizer$'; \
docker-php-ext-install tokenizer; \ else \
fi docker-php-ext-install tokenizer; \
fi
# Add a non-root user to help install ffmpeg: # Add a non-root user to help install ffmpeg:
ARG PUID=1000 ARG PUID=1000