Make use of cached files in build process
This commit is contained in:
parent
7d3ffe7865
commit
f3bac9332b
@ -4,6 +4,12 @@ FROM node:18-alpine AS deps
|
||||
RUN apk add libc6-compat
|
||||
WORKDIR /app
|
||||
|
||||
# Copy cached files
|
||||
COPY ./node_modules ./node_modules
|
||||
|
||||
# Install dependencies
|
||||
RUN yarn
|
||||
|
||||
# Install dependencies based on the preferred package manager
|
||||
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
|
||||
RUN \
|
||||
@ -25,9 +31,6 @@ COPY . .
|
||||
# Uncomment the following line in case you want to disable telemetry during the build.
|
||||
ENV NEXT_TELEMETRY_DISABLED 1
|
||||
|
||||
# Install dependencies
|
||||
RUN yarn
|
||||
|
||||
# Build the project
|
||||
RUN yarn build
|
||||
|
||||
|
Reference in New Issue
Block a user