From b24988d8bc65920bee5d380bd8c04431eb76cdb2 Mon Sep 17 00:00:00 2001 From: Missez Date: Thu, 5 Feb 2026 14:00:57 +0700 Subject: [PATCH] feat: Add a multi-stage Dockerfile for building and running the frontend application. --- frontend_management/Dockerfile | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/frontend_management/Dockerfile b/frontend_management/Dockerfile index 84d49d4f..b2d3a831 100644 --- a/frontend_management/Dockerfile +++ b/frontend_management/Dockerfile @@ -29,18 +29,11 @@ WORKDIR /app # Set environment to production ENV NODE_ENV=production -# Create non-root user for security -RUN addgroup --system --gid 1001 nodejs \ - && adduser --system --uid 1001 nuxtjs - # Copy package files for preview command -COPY --from=builder --chown=nuxtjs:nodejs /app/package*.json ./ -COPY --from=builder --chown=nuxtjs:nodejs /app/node_modules ./node_modules -COPY --from=builder --chown=nuxtjs:nodejs /app/.nuxt ./.nuxt -COPY --from=builder --chown=nuxtjs:nodejs /app/.output ./.output - -# Switch to non-root user -USER nuxtjs +COPY --from=builder /app/package*.json ./ +COPY --from=builder /app/node_modules ./node_modules +COPY --from=builder /app/.nuxt ./.nuxt +COPY --from=builder /app/.output ./.output # Expose port EXPOSE 3001