build(dockerfile): replace yarn with pnpm
This commit is contained in:
parent
68072b5f68
commit
20418b4c1f
@ -4,8 +4,8 @@
|
|||||||
FROM node:lts-alpine AS deps
|
FROM node:lts-alpine AS deps
|
||||||
|
|
||||||
WORKDIR /opt/app
|
WORKDIR /opt/app
|
||||||
COPY package.json yarn.lock ./
|
COPY package.json pnpm-lock.yaml ./
|
||||||
RUN yarn install --frozen-lockfile
|
RUN pnpm install --frozen-lockfile
|
||||||
|
|
||||||
# Rebuild the source code only when needed
|
# Rebuild the source code only when needed
|
||||||
# This is where because may be the case that you would try
|
# This is where because may be the case that you would try
|
||||||
@ -17,7 +17,7 @@ ENV NODE_ENV=production
|
|||||||
WORKDIR /opt/app
|
WORKDIR /opt/app
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=deps /opt/app/node_modules ./node_modules
|
COPY --from=deps /opt/app/node_modules ./node_modules
|
||||||
RUN yarn build
|
RUN pnpm build
|
||||||
|
|
||||||
# Production image, copy all the files and run next
|
# Production image, copy all the files and run next
|
||||||
FROM node:lts-alpine AS runner
|
FROM node:lts-alpine AS runner
|
||||||
|
Loading…
x
Reference in New Issue
Block a user