Unraid Container Builder creates directories at mount points by default, which fails when the container already has a file at that path. Moving 000-default.conf from a bind-mount to a COPY in the Dockerfile avoids the OCI runtime error and is the correct pattern — config files belong in the image, only persistent data should be mounted as volumes. https://claude.ai/code/session_015wpwmheufcxkBuXivrSHhd
26 lines
672 B
Docker
26 lines
672 B
Docker
FROM php:8.2-apache
|
|
|
|
# Install PHP extensions and utilities
|
|
RUN apt-get update && apt-get install -y \
|
|
libpng-dev \
|
|
libjpeg-dev \
|
|
libwebp-dev \
|
|
libzip-dev \
|
|
zip \
|
|
unzip \
|
|
&& docker-php-ext-configure gd --with-jpeg --with-webp \
|
|
&& docker-php-ext-install gd pdo pdo_mysql mysqli zip \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Enable Apache modules
|
|
RUN a2enmod rewrite ssl headers deflate expires
|
|
|
|
# Copy Apache vhost config and PHP config
|
|
COPY docker/apache/000-default.conf /etc/apache2/sites-available/000-default.conf
|
|
COPY docker/php/php.ini /usr/local/etc/php/conf.d/custom.ini
|
|
|
|
# Set working directory
|
|
WORKDIR /var/www/html
|
|
|
|
EXPOSE 80 443
|