Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Successful in 33s
Security Vulnerability Scan / Check for Dependency Changes (push) Successful in 39s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Successful in 17s
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Successful in 1m15s
Security Vulnerability Scan / Composer Security Audit (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Failing after 33s
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
- Add build-ci-image-production.sh script for building CI images on production - Add BUILD_ON_PRODUCTION.md documentation - Fix Dockerfile to handle optional PECL extensions for PHP 8.5 RC This fixes the issue where Gitea workflows fail with: 'Error response from daemon: pull access denied for php-ci'
74 lines
1.9 KiB
Docker
74 lines
1.9 KiB
Docker
# Dockerfile für CI/CD Workflows
|
|
# Optimiert für Gitea Actions Runner mit PHP 8.5 und allen benötigten Tools
|
|
ARG PHP_VERSION=8.5.0RC4
|
|
# Override via --build-arg PHP_VERSION=8.5.0RCX to track upstream releases
|
|
FROM php:${PHP_VERSION}-cli
|
|
|
|
# System-Abhängigkeiten für CI/CD
|
|
RUN apt-get update && apt-get install -y \
|
|
git \
|
|
curl \
|
|
unzip \
|
|
zip \
|
|
lsb-release \
|
|
ca-certificates \
|
|
apt-transport-https \
|
|
jq \
|
|
ansible \
|
|
libzip-dev \
|
|
libpng-dev \
|
|
libjpeg-dev \
|
|
libfreetype6-dev \
|
|
libwebp-dev \
|
|
libavif-dev \
|
|
libxpm-dev \
|
|
libsodium-dev \
|
|
libpq-dev \
|
|
libxml2-dev \
|
|
libicu-dev \
|
|
libonig-dev \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Installiere PHP Extensions (CLI-Version)
|
|
RUN docker-php-ext-configure gd \
|
|
--with-freetype \
|
|
--with-jpeg \
|
|
--with-webp \
|
|
&& docker-php-ext-install -j$(nproc) \
|
|
zip \
|
|
pdo_mysql \
|
|
pdo_pgsql \
|
|
pcntl \
|
|
bcmath \
|
|
mbstring \
|
|
xml \
|
|
intl \
|
|
exif \
|
|
soap \
|
|
gd
|
|
|
|
# Installiere PECL Extensions (optional - kann bei PHP RC-Versionen fehlschlagen)
|
|
RUN (pecl install apcu redis-6.3.0RC1 2>/dev/null || true) \
|
|
&& (docker-php-ext-enable apcu redis 2>/dev/null || true) || true
|
|
|
|
# Configure APCu (nur wenn Extension installiert wurde)
|
|
RUN if php -m | grep -q apcu; then \
|
|
echo "apc.enable_cli=1" >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini \
|
|
&& echo "apc.shm_size=128M" >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini; \
|
|
fi
|
|
|
|
# Composer installieren
|
|
RUN curl -sS https://getcomposer.org/installer | php \
|
|
&& mv composer.phar /usr/local/bin/composer \
|
|
&& chmod +x /usr/local/bin/composer
|
|
|
|
# Arbeitsverzeichnis
|
|
WORKDIR /workspace
|
|
|
|
# Standard-User für CI (UID/GID 1000)
|
|
RUN groupadd -g 1000 ci && useradd -u 1000 -g ci -m ci
|
|
|
|
# Stelle sicher, dass alle benötigten Tools verfügbar sind
|
|
RUN php -v && composer --version && git --version && jq --version
|