Run as root in dev mode for file write permissions
This commit is contained in:
@@ -36,9 +36,10 @@ RUN addgroup --system --gid 1001 nodejs
|
|||||||
RUN adduser --system --uid 1001 nextjs
|
RUN adduser --system --uid 1001 nextjs
|
||||||
|
|
||||||
# Copy all files from builder
|
# Copy all files from builder
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app ./
|
COPY --from=builder /app ./
|
||||||
|
|
||||||
USER nextjs
|
# Don't switch to nextjs user for dev mode - needs write permissions
|
||||||
|
# USER nextjs
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user