From 9c757ff7d2407acbf54de01532560842b00e04a6 Mon Sep 17 00:00:00 2001 From: Doan Minh Tu Date: Wed, 11 Mar 2026 08:24:48 +0700 Subject: [PATCH] fix(docker): move data dir chown after COPY to fix EACCES permission error --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8901e172..511b979b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,14 +18,14 @@ ENV PORT=20128 ENV HOSTNAME=0.0.0.0 ENV NEXT_TELEMETRY_DISABLED=1 -# Runtime writable location for localDb when DATA_DIR is configured to /app/data -RUN mkdir -p /app/data && chown node:node /app/data - COPY --from=builder /app/public ./public COPY --from=builder /app/.next/static ./.next/static COPY --from=builder /app/.next/standalone ./ COPY --from=builder /app/open-sse ./open-sse +# Runtime writable location for localDb — must be AFTER COPY to avoid permission overwrite +RUN mkdir -p /app/data && chown node:node /app/data + USER node EXPOSE 20128