permission fix

This commit is contained in:
Liam 2022-10-26 14:23:54 +01:00
parent 5dac11a1f8
commit 527ef72b0f

@ -47,8 +47,8 @@ ENV NODE_ENV production
# Uncomment the following line in case you want to disable telemetry during runtime. # Uncomment the following line in case you want to disable telemetry during runtime.
ENV NEXT_TELEMETRY_DISABLED 1 ENV NEXT_TELEMETRY_DISABLED 1
RUN addgroup --system --gid 1001 nodejs RUN addgroup -g 1001 -S nodejs
RUN adduser --system --uid 1001 nextjs RUN adduser -S nextjs -u 1001
COPY --from=builder /app/public ./public COPY --from=builder /app/public ./public
@ -58,6 +58,8 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
COPY --from=builder --chown=nextjs:nodejs /app/entrypoint.sh ./entrypoint.sh COPY --from=builder --chown=nextjs:nodejs /app/entrypoint.sh ./entrypoint.sh
RUN chown -R nextjs:nodejs /app/.next
USER nextjs USER nextjs
EXPOSE 3000 EXPOSE 3000