tailwind-nextjs-blog/Dockerfile
Ivan Li adb7b2cf3f
Some checks failed
continuous-integration/drone/push Build is failing
Revert "fix: Dockerfile can not build."
This reverts commit b87470d051.
2022-10-09 11:50:16 +08:00

15 lines
309 B
Docker

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