From 527ef72b0f034c15f1714cf001a43de51bdc2c31 Mon Sep 17 00:00:00 2001 From: Liam <67254223+RealFascinated@users.noreply.github.com> Date: Wed, 26 Oct 2022 14:23:54 +0100 Subject: [PATCH] permission fix --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b63bc30..a62e231 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,8 +47,8 @@ ENV NODE_ENV production # Uncomment the following line in case you want to disable telemetry during runtime. ENV NEXT_TELEMETRY_DISABLED 1 -RUN addgroup --system --gid 1001 nodejs -RUN adduser --system --uid 1001 nextjs +RUN addgroup -g 1001 -S nodejs +RUN adduser -S nextjs -u 1001 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/entrypoint.sh ./entrypoint.sh +RUN chown -R nextjs:nodejs /app/.next + USER nextjs EXPOSE 3000