removed nextjs user to allow usage of docker.sock

This commit is contained in:
Neshura 2022-12-09 23:28:15 +01:00
parent 9f22f4c198
commit 39afc6cdd6
No known key found for this signature in database
GPG key ID: ACDF5B6EBECF6B0A

View file

@ -30,18 +30,13 @@ WORKDIR /usr/src/app
ENV NODE_ENV production ENV NODE_ENV production
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
COPY --from=builder /app/public ./public COPY --from=builder /app/public ./public
COPY --from=builder /app/node_modules ./node_modules COPY --from=builder /app/node_modules ./node_modules
# Automatically leverage output traces to reduce image size # Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing # https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static COPY --from=builder /app/.next/static ./.next/static
USER nextjs
# expose port 3000 # expose port 3000
ENV PORT 3000 ENV PORT 3000