Revert "fix: Dockerfile can not build."
Some checks failed
continuous-integration/drone/push Build is failing

This reverts commit b87470d051.
This commit is contained in:
Ivan Li 2022-10-09 11:50:16 +08:00
parent 8d2406e3d5
commit adb7b2cf3f

View File

@ -1,15 +1,15 @@
FROM node:16-alpine as base FROM node:16-alpine as base
RUN apk add --no-cache libc6-compat RUN apk add --no-cache libc6-compat
WORKDIR /app WORKDIR /app
RUN npm i --location=global pnpm@7
COPY pnpm-lock.yaml package.json ./ COPY pnpm-lock.yaml package.json ./
RUN pnpm i --frozen-lockfile RUN npm i --location=global pnpm@7 &&\
pnpm i
FROM base as release FROM node:16-alpine as release
WORKDIR /app WORKDIR /app
COPY . . COPY . .
COPY --from=base /app ./ COPY --from=base /app ./
RUN pnpm build &&\ RUN pnpm build &&\
pnpm prune --prod --config.ignore-scripts=true pnpm prune --prod
EXPOSE 80 EXPOSE 80
CMD pnpm serve -p 80 CMD pnpm serve -p 80