Files
lichterei-web/Dockerfile
T
godelandClaude Opus 5.5 a28632abdf Ubuntu-Basis auf 24.04 pinnen (PHP2Shell-Fix, Kirby 4 braucht PHP <= 8.4)
ubuntu:latest ist inzwischen 26.04 mit PHP 8.5, das Kirby 4.6 nicht unterstuetzt.
24.04 liefert php8.3 8.3.6-0ubuntu0.24.04.13 mit dem Fix fuer
CVE-2026-109618/-109619. Image neu bauen mit --pull.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 12:56:10 +02:00

58 lines
1.5 KiB
Docker

# Ubuntu 24.04 LTS gepinnt: PHP 8.3 (Kirby 4 unterstuetzt max. PHP 8.4; ubuntu:latest liefert inzwischen 8.5)
FROM ubuntu:24.04
# Set timezone
ENV TZ=Europe/Berlin
# Configure timezone data during build
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Avoid interactive prompts during apt install
ARG DEBIAN_FRONTEND=noninteractive
# Install Apache, PHP and required extensions
RUN apt-get update && apt-get install -y \
apache2 \
apache2-utils \
ca-certificates \
php \
libapache2-mod-php \
php-curl \
php-dom \
php-gd \
php-intl \
php-json \
php-mbstring \
php-xml \
php-zip && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Ensure shared group ownership for collaborative editing
RUN groupadd -g 1111 kirbygroup && usermod -aG kirbygroup www-data
# Provide Apache vhost configuration and entrypoint
COPY default.conf /etc/apache2/sites-available/000-default.conf
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Remove default Apache placeholder page
RUN rm -rf /var/www/html/*
# Copy project into the image
COPY --chown=www-data:kirbygroup . /var/www/html
# Enable required Apache modules
RUN a2enmod headers rewrite
# Ensure collaborative permissions at runtime
RUN chmod -R g+rw /var/www/html && find /var/www/html -type d -exec chmod g+xs {} \;
# Expose web port
EXPOSE 80
# Allow UID remapping before Apache starts
ENTRYPOINT ["/entrypoint.sh"]
# Start Apache in foreground
CMD ["/usr/sbin/apache2ctl", "-DFOREGROUND"]