From b48deb39a7c385942b9ec9b6a260baeccca928fe Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 18 Nov 2026 04:34:25 +0000 Subject: [PATCH] Install the pcntl extension in the Docker image The PHP builds of shivammathur/setup-php on the GitHub runners have pcntl, but the official PHP images do not, so packages that fork, such as wp-cli/batch-command, behaved differently in the containers than on the host. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UWTd5oZXFWfL1mxtssHXwz --- utils/docker/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/docker/Dockerfile b/utils/docker/Dockerfile index c11f181e..5d5175b0 100644 --- a/utils/docker/Dockerfile +++ b/utils/docker/Dockerfile @@ -12,6 +12,8 @@ RUN . /etc/os-release \ fi # Images of older PHP versions are based on Debian releases whose packages have moved to the archive. +# The extensions match those the PHP builds of shivammathur/setup-php have on the GitHub runners, +# such as pcntl, which the official images leave out. RUN install_packages() { \ apt-get update && apt-get install -y --no-install-recommends \ curl git jq less libmariadb3 mariadb-client procps sqlite3 subversion unzip vim-tiny zip \ @@ -24,7 +26,7 @@ RUN install_packages() { \ } ) \ && ( docker-php-ext-configure gd --with-freetype --with-jpeg \ || docker-php-ext-configure gd --with-freetype-dir=/usr --with-jpeg-dir=/usr ) \ - && docker-php-ext-install exif gd mysqli pdo_mysql zip \ + && docker-php-ext-install exif gd mysqli pcntl pdo_mysql zip \ && ( php -m | grep -qi '^zend opcache$' || docker-php-ext-install opcache ) \ && rm -rf /var/lib/apt/lists/*