fix: update Dockerfile to create cache directory and adjust ownership for improved security and functionality

This commit is contained in:
Julien Froidefond
2025-10-17 15:35:30 +02:00
parent 0cec7f205f
commit 191f10b8d7

View File

@@ -70,7 +70,8 @@ COPY --from=builder /app/scripts ./scripts
# Add non-root user for security
RUN addgroup --system --gid 1001 nodejs && \
adduser --system --uid 1001 nextjs && \
chown -R nextjs:nodejs /app
mkdir -p /app/.cache && \
chown -R nextjs:nodejs /app /app/.cache
USER nextjs