# Image for CI: PHP, Composer and the extensions the suite needs. No runtime # server; the frontend build runs in its own job on a node image. # # Published as incr-ci:php-, not :latest. Runners cache # mutable tags and will not re-pull them, so bump the revision in the tag and # in ci.yml whenever this file changes. # # Debian-based rather than alpine: ffr hit repeated DNS resolution timeouts # against codeload.github.com on the alpine build. # # pdo_sqlite: tests run against sqlite in memory (see .env.testing). Service # containers are not reachable from job containers on this runner, so CI must # not depend on one. pdo_mysql is kept so artisan can talk to a real database # when run manually inside this image. FROM php:8.3-cli COPY --from=mlocati/php-extension-installer:2 /usr/bin/install-php-extensions /usr/local/bin/ RUN install-php-extensions \ pdo_sqlite \ pdo_mysql \ mbstring \ dom \ xml \ bcmath \ fileinfo \ pcntl \ gd \ pcov # nodejs is not used by the app's tests; the Forgejo JavaScript actions # (checkout, cache) are executed with it inside this container. # The MySQL readiness check in ci.yml uses PHP's fsockopen, so no netcat here. RUN apt-get update \ && apt-get install -y --no-install-recommends git unzip nodejs \ && rm -rf /var/lib/apt/lists/* COPY --from=composer:2 /usr/bin/composer /usr/bin/composer