Update Dockerfile
This commit is contained in:
parent
13e8c0a97c
commit
d29666023e
@ -24,6 +24,9 @@ COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
|
|||||||
# Uncomment the following line in case you want to disable telemetry during the build.
|
# Uncomment the following line in case you want to disable telemetry during the build.
|
||||||
ENV NEXT_TELEMETRY_DISABLED 1
|
ENV NEXT_TELEMETRY_DISABLED 1
|
||||||
|
|
||||||
|
# Copy cached files
|
||||||
|
COPY node_modules ./
|
||||||
|
|
||||||
RUN npm i
|
RUN npm i
|
||||||
|
|
||||||
# Build the project
|
# Build the project
|
||||||
@ -49,10 +52,6 @@ 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/public ./.next/static
|
COPY --from=builder --chown=nextjs:nodejs /app/public ./.next/static
|
||||||
|
|
||||||
# Copy cached files
|
|
||||||
COPY node_modules ./
|
|
||||||
|
|
||||||
|
|
||||||
RUN chown -R nextjs:nodejs /app
|
RUN chown -R nextjs:nodejs /app
|
||||||
|
|
||||||
USER nextjs
|
USER nextjs
|
||||||
|
Reference in New Issue
Block a user