34 lines
1.3 KiB
Text
34 lines
1.3 KiB
Text
# Image for CI: PHP and Composer only, no runtime server or frontend toolchain.
|
|
# pdo_mysql is here for the MariaDB test database (#169); pdo_sqlite stays until
|
|
# that switch lands. No CLI database client — PHPUnit reaches the database
|
|
# through PDO and never shells out.
|
|
#
|
|
# Published as fedi-feed-router-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: the alpine build hit repeated DNS resolution
|
|
# timeouts against codeload.github.com during composer install.
|
|
#
|
|
# gd is not declared in composer.lock but ThumbnailUploader calls it directly.
|
|
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 \
|
|
fileinfo \
|
|
pcntl \
|
|
gd
|
|
|
|
# nodejs is not used by the app's tests; the Forgejo/GitHub 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 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|