35 lines
1.2 KiB
Text
35 lines
1.2 KiB
Text
# 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<version>-<revision>, 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_mysql, not sqlite: the migration tests query information_schema and
|
|
# exercise MySQL-specific DDL, so CI runs against a real mysql:8.0 service.
|
|
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_mysql \
|
|
mbstring \
|
|
dom \
|
|
xml \
|
|
bcmath \
|
|
fileinfo \
|
|
pcntl \
|
|
gd \
|
|
pcov
|
|
|
|
# netcat-openbsd backs the MySQL readiness check in ci.yml.
|
|
# nodejs is not used by the app's tests; the Forgejo JavaScript actions
|
|
# (checkout, cache) are executed with it inside this container.
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends git unzip nodejs netcat-openbsd \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|