innhold/Dockerfile
Ruben 6cf9710ac1 Add Docker configuration for PHP 8.4 Apache container
Enable Apache rewrite module and custom configuration
Configure logging to container output streams
Update compose file to use build context instead of direct image
Remove redundant volume mount for apache.conf
Remove unnecessary command override
2026-01-14 20:24:41 +01:00

12 lines
525 B
Docker

FROM php:8.4.14-apache
# Enable Apache modules and custom config as root during build
RUN a2enmod rewrite
COPY apache.conf /etc/apache2/conf-available/custom.conf
RUN a2enconf custom
# Log to /proc/self/fd for container output
RUN sed -i 's|ErrorLog.*|ErrorLog /proc/self/fd/2|' /etc/apache2/sites-available/000-default.conf \
&& sed -i 's|CustomLog.*|CustomLog /proc/self/fd/1 combined|' /etc/apache2/sites-available/000-default.conf \
&& sed -i 's|ErrorLog.*|ErrorLog /proc/self/fd/2|' /etc/apache2/apache2.conf