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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user