From 187658d9c9e8b73bb3c91f0614fce19381462c3c Mon Sep 17 00:00:00 2001 From: ZacharyZcR Date: Wed, 24 Sep 2025 02:22:59 +0800 Subject: [PATCH] FIX: Docker startup ENOSPC error - add missing SSL directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Pre-create /app/ssl directory in Dockerfile to prevent runtime creation failures - Set proper permissions for /app/ssl, /app/config, and /app/data directories - Ensure all required directories exist before application startup Fixes: - ENOSPC error when creating SSL directory at runtime - Permission issues with auto-generated .env file writing - Container restart loops due to initialization failures 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- docker/Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index cdb9cdf1..db923765 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -72,8 +72,8 @@ ENV DATA_DIR=/app/data \ NODE_ENV=production RUN apk add --no-cache nginx gettext su-exec openssl && \ - mkdir -p /app/data /app/config && \ - chown -R node:node /app/data /app/config + mkdir -p /app/data /app/config /app/ssl && \ + chown -R node:node /app/data /app/config /app/ssl COPY docker/nginx.conf /etc/nginx/nginx.conf COPY docker/nginx-https.conf /etc/nginx/nginx-https.conf @@ -88,7 +88,8 @@ COPY --from=backend-builder /app/dist/backend ./dist/backend COPY package.json ./ RUN chown -R node:node /app && \ - chmod 755 /app/config + chmod 755 /app/config /app/ssl && \ + chmod 755 /app/data VOLUME ["/app/data"]