From 9ba4197bfd3c4dbbd6385a0748ead53a06799ec9 Mon Sep 17 00:00:00 2001 From: Frank Date: Sat, 12 Sep 2026 13:49:07 +0200 Subject: [PATCH] Fix puzzle-relay crash loop: install pcntl/posix extensions Workerman requires pcntl and posix on Linux; without them the relay printed "Please install pcntl extension" and exited immediately, Docker kept restarting it, and nginx's DNS lookups for dmtools-puzzle-relay intermittently failed whenever it happened to be down mid-restart - the "could not be resolved" errors were a symptom of this crash loop, not a separate networking problem. Local dev never hit this because Workerman's Windows code path doesn't need either extension. Co-Authored-By: Claude Sonnet 5 --- docker/php/Dockerfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile index ce1f119..da6c752 100644 --- a/docker/php/Dockerfile +++ b/docker/php/Dockerfile @@ -6,11 +6,17 @@ RUN apk add --no-cache bash git unzip # right system libraries itself, builds, and cleans up - much less fragile # than hand-maintaining apk build deps. COPY --from=mlocati/php-extension-installer:latest /usr/bin/install-php-extensions /usr/local/bin/ +# pcntl and posix aren't needed by php-fpm itself, but the puzzle-relay +# service (docker-compose.yml) runs this same image as a Workerman process, +# and Workerman requires both on Linux (its Windows-only code path, the one +# used in local dev, doesn't need them - which is why this was missed there). RUN install-php-extensions \ intl \ pdo_mysql \ opcache \ - zip + zip \ + pcntl \ + posix COPY --from=composer:2 /usr/bin/composer /usr/bin/composer