Fix file bind-mount error by COPYing Apache config into image

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
This commit is contained in:
Claude
2026-02-28 22:29:18 +00:00
parent d0be9a0461
commit 80c69a7217
2 changed files with 4 additions and 2 deletions

View File

@@ -15,7 +15,8 @@ RUN apt-get update && apt-get install -y \
# Enable Apache modules
RUN a2enmod rewrite ssl headers deflate expires
# Copy PHP config
# 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