Commit 060b5fe4 authored by Anthony Jacob's avatar Anthony Jacob
Browse files

specific user for Docker container

parent 32511005
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -20,6 +20,15 @@ COPY --from=builder /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json

# Create non-root user
RUN groupadd -g 10001 appuser \
    && useradd -u 10001 -g appuser -m appuser

# Fix permissions
RUN chown -R appuser:appuser /app

USER appuser

# If using custom server (e.g. Express), copy it too
# COPY --from=builder /app/server.js ./server.js