ples use cache thank
This commit is contained in:
parent
f3bac9332b
commit
91ba604469
11
Dockerfile
11
Dockerfile
@ -4,12 +4,6 @@ FROM node:18-alpine AS deps
|
|||||||
RUN apk add libc6-compat
|
RUN apk add libc6-compat
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy cached files
|
|
||||||
COPY ./node_modules ./node_modules
|
|
||||||
|
|
||||||
# Install dependencies
|
|
||||||
RUN yarn
|
|
||||||
|
|
||||||
# Install dependencies based on the preferred package manager
|
# Install dependencies based on the preferred package manager
|
||||||
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
|
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
|
||||||
RUN \
|
RUN \
|
||||||
@ -19,6 +13,11 @@ RUN \
|
|||||||
else echo "Lockfile not found." && exit 1; \
|
else echo "Lockfile not found." && exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Copy cached files
|
||||||
|
COPY node_modules ./
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN yarn
|
||||||
|
|
||||||
# Rebuild the source code only when needed
|
# Rebuild the source code only when needed
|
||||||
FROM node:18-alpine AS builder
|
FROM node:18-alpine AS builder
|
||||||
|
Reference in New Issue
Block a user