Skip to content

Commit

Permalink
Merge pull request #3340 from oozone/fix-laravel-horizon-tokenizer-ph…
Browse files Browse the repository at this point in the history
…p-version

Fix Laravel Horizon container not building due to tokenizer in Dockerfile for PHP 8.2
  • Loading branch information
bestlong committed Mar 29, 2023
2 parents 368ef0d + b292e08 commit e69c4f0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions laravel-horizon/Dockerfile
Expand Up @@ -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
Expand Down

0 comments on commit e69c4f0

Please sign in to comment.