Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable PCNTL on Docker PHP 8.2 image

Tags:

php

docker

Trying to install the PHP PCNTL onto the PHP 8.2.4-cli Docker image to utilise SIGTERM.

But it doesn't appear to enable support for it.

Dockerfile

FROM php:8.2.4-cli

RUN docker-php-ext-configure pcntl --enable-pcntl

Testing

docker build -f Dockerfile .

docker run --rm -it --entrypoint bash image_id

php -i | grep pcntl

According to online documents should expect to see pcntl support => enabled but doesn't appear to be enabled.

Any indicators on where I'm going wrong here?

like image 459
Nick Avatar asked Oct 28 '25 19:10

Nick


1 Answers

RUN docker-php-ext-configure pcntl --enable-pcntl \
  && docker-php-ext-install pcntl;
like image 185
Pham Khien Avatar answered Oct 31 '25 10:10

Pham Khien