From 620cfb0371e78c26bfd7066fbf58cd6384a43fec Mon Sep 17 00:00:00 2001 From: Kunthawat Greethong Date: Wed, 29 Apr 2026 19:58:28 +0700 Subject: [PATCH] Create astro user BEFORE copying data.db, fix chown order Co-Authored-By: Claude Opus 4.6 --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ecba2a6..6dbf7b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,14 +24,13 @@ WORKDIR /app ENV NODE_ENV=production ENV HOST=0.0.0.0 -RUN adduser --system --uid 1001 astro -USER astro - COPY --from=builder /app/node_modules ./node_modules COPY --from=builder /app/dist ./dist COPY --from=builder /app/data.db ./data.db -RUN chown 1001:1001 /app/data.db +RUN adduser --system --uid 1001 astro && chown 1001:1001 /app/data.db + +USER astro EXPOSE 4321