Do not install tokenizer into php-worker when php version is 8.1

This commit is contained in:
tancou 2022-02-09 18:20:34 +01:00
parent 01ab8c7d1e
commit 189ce1cdff

View File

@ -38,7 +38,12 @@ RUN apk --update add wget \
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:
ARG PUID=1000