diff --git a/examples/with-docker/Dockerfile b/examples/with-docker/Dockerfile index 791eff1edbecd..28514819179b9 100644 --- a/examples/with-docker/Dockerfile +++ b/examples/with-docker/Dockerfile @@ -45,6 +45,10 @@ RUN adduser --system --uid 1001 nextjs COPY --from=builder /app/public ./public +# Set the correct permission for prerender cache +RUN mkdir .next +RUN chown nextjs:nodejs .next + # Automatically leverage output traces to reduce image size # https://nextjs.org/docs/advanced-features/output-file-tracing COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./