Files
peptide-e2e/ci-image/Dockerfile

16 lines
1.1 KiB
Docker

# peptide-ci-php: Gitea runner image with PHP 8.1/8.2/8.3 + Composer preinstalled.
# Why: shivammathur/setup-php treats the stock runner image as a bare self-hosted
# box and apt-installs a whole compiler toolchain on every job (~5-10 min each).
# Built into the gitea-dind daemon by ci-image/build.sh; runner label `peptide-php`.
FROM docker.gitea.com/runner-images@sha256:fd911d7417bfbf0f454530e447da95b58001e1df41bbc5e1a8dd35d432575aae
RUN set -eux; export DEBIAN_FRONTEND=noninteractive; \
apt-get update; apt-get install -y --no-install-recommends software-properties-common gnupg unzip mariadb-client; \
add-apt-repository -y ppa:ondrej/php; apt-get update; \
for v in 8.1 8.2 8.3; do \
apt-get install -y --no-install-recommends php$v-cli php$v-common php$v-mbstring php$v-xml php$v-curl php$v-zip php$v-mysql php$v-intl php$v-bcmath php$v-gd; \
done; \
update-alternatives --set php /usr/bin/php8.3; \
curl -fsSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer; \
composer --version; php8.1 -v | head -1; php8.2 -v | head -1; php8.3 -v | head -1; \
rm -rf /var/lib/apt/lists/*