2026-08-17 14:00:02 +02:00
|
|
|
# CI image: PHP + Composer only, no runtime server or frontend toolchain.
|
|
|
|
|
# Tests run against SQLite in memory (see .env.testing), so no database client
|
|
|
|
|
# or cache extension is needed.
|
|
|
|
|
#
|
|
|
|
|
# Published as dishplanner-ci:php8.3-<revision>. Bump the revision in the tag
|
2026-08-17 14:58:10 +02:00
|
|
|
# (.forgejo/workflows/images.yml) and in .forgejo/workflows/ci.yml whenever
|
|
|
|
|
# this file changes (runners cache mutable tags and will not re-pull them).
|
2026-08-17 14:00:02 +02:00
|
|
|
#
|
|
|
|
|
# Debian-based rather than Alpine to avoid the DNS resolution timeouts against
|
|
|
|
|
# codeload.github.com that the Alpine base hit during composer install.
|
|
|
|
|
|
|
|
|
|
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 \
|
|
|
|
|
mbstring \
|
|
|
|
|
dom \
|
|
|
|
|
xml \
|
|
|
|
|
fileinfo \
|
2026-08-17 14:58:10 +02:00
|
|
|
pcntl \
|
|
|
|
|
zip
|
2026-08-17 14:00:02 +02:00
|
|
|
|
|
|
|
|
# git is needed by the checkout action; nodejs runs the Forgejo JavaScript
|
|
|
|
|
# actions (checkout, cache); unzip lets Composer extract dist archives.
|
|
|
|
|
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
|
2026-08-17 18:04:30 +02:00
|
|
|
|
|
|
|
|
# phpstan/phpstan is dist-only (no VCS source), so pre-warm its Composer cache
|
|
|
|
|
# here to avoid codeload.github.com rate limits during CI's composer install.
|
|
|
|
|
# Keep the version in sync with composer.lock. Build this image on a network
|
|
|
|
|
# that isn't codeload-rate-limited (e.g. locally) until #50 is resolved.
|
|
|
|
|
RUN mkdir -p /tmp/warm && cd /tmp/warm \
|
|
|
|
|
&& printf '{"require":{"phpstan/phpstan":"2.2.8"}}' > composer.json \
|
|
|
|
|
&& composer install --no-interaction --no-progress \
|
|
|
|
|
&& rm -rf /tmp/warm
|