Hopefully make Dockerfile use cache?
This commit is contained in:
parent
f1c03442b8
commit
ae621cae3f
@ -4,9 +4,6 @@ FROM node:18-alpine AS deps
|
||||
RUN apk add libc6-compat
|
||||
WORKDIR /app
|
||||
|
||||
# Copy cached files
|
||||
COPY node_modules /app
|
||||
|
||||
# # Install dependencies based on the preferred package manager
|
||||
# COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
|
||||
# RUN \
|
||||
@ -50,6 +47,9 @@ 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/public ./.next/static
|
||||
|
||||
# Copy cached files
|
||||
COPY node_modules ./
|
||||
|
||||
RUN npm i
|
||||
|
||||
RUN chown -R nextjs:nodejs /app
|
||||
|
Reference in New Issue
Block a user