Skip to content

Commit

Permalink
Revert "fix: permissions in with-docker example" (#63165)
Browse files Browse the repository at this point in the history
Reverts #63134

Closes NEXT-2783
  • Loading branch information
samcx authored Mar 12, 2024
1 parent 7b5d81c commit 3f1ae54
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions examples/with-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

RUN mkdir -p public

# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
# Uncomment the following line in case you want to disable telemetry during the build.
Expand All @@ -47,17 +45,17 @@ ENV NODE_ENV production
RUN addgroup --system --gid 1001 nodejs
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/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

# Set the correct permission for prerender cache
RUN mkdir -p .next/cache
RUN chown -R nextjs:nodejs .next
RUN chmod -R 777 .next/cache

USER nextjs

EXPOSE 3000
Expand Down

0 comments on commit 3f1ae54

Please sign in to comment.