fix: Build CI images on production server
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'
This commit is contained in:
2025-11-08 14:33:59 +01:00
parent 07e92a8709
commit efa97f8b5d
3 changed files with 218 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
# 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.0RC3
ARG PHP_VERSION=8.5.0RC4
# Override via --build-arg PHP_VERSION=8.5.0RCX to track upstream releases
FROM php:${PHP_VERSION}-cli
@@ -48,13 +48,15 @@ RUN docker-php-ext-configure gd \
soap \
gd
# Installiere PECL Extensions
RUN pecl install apcu redis-6.3.0RC1 \
&& docker-php-ext-enable apcu redis
# 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
RUN 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
# 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 \