From b87470d051d6e001944d9e304079e19acaa13aee Mon Sep 17 00:00:00 2001 From: Ivan Li Date: Sun, 9 Oct 2022 01:07:44 +0800 Subject: [PATCH] fix: Dockerfile can not build. --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index e7d70a4..f3cc3b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,15 @@ FROM node:16-alpine as base RUN apk add --no-cache libc6-compat WORKDIR /app +RUN npm i --location=global pnpm@7 COPY pnpm-lock.yaml package.json ./ -RUN npm i --location=global pnpm@7 &&\ - pnpm i +RUN pnpm i --frozen-lockfile -FROM node:16-alpine as release +FROM base as release WORKDIR /app COPY . . COPY --from=base /app ./ RUN pnpm build &&\ - pnpm prune --prod + pnpm prune --prod --config.ignore-scripts=true EXPOSE 80 CMD pnpm serve -p 80 \ No newline at end of file