From 80c69a7217157c2b9b393f461259721b51a77b8b Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Feb 2026 22:29:18 +0000 Subject: [PATCH] Fix file bind-mount error by COPYing Apache config into image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- Dockerfile | 3 ++- README.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4c3f7ea..dce4858 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/README.md b/README.md index 21a1290..78e7c10 100644 --- a/README.md +++ b/README.md @@ -131,9 +131,10 @@ docker build -t alwisp_web:latest . | Container Path | Host Path | Access Mode | |---|---|---| | `/var/www/html` | `/mnt/user/appdata/alwisp/www` | Read/Write | -| `/etc/apache2/sites-available/000-default.conf` | `/mnt/user/appdata/alwisp/docker/apache/000-default.conf` | Read Only | | `/etc/apache2/ssl` | `/mnt/user/appdata/alwisp/docker/apache/ssl` | Read Only | +> The Apache vhost config (`000-default.conf`) is baked directly into the image via `COPY` in the Dockerfile — no bind mount needed. To change it, edit the file in `docker/apache/` and rebuild the image. + 5. Click **Apply** ---