tailwind-nextjs-blog/Dockerfile
Ivan Li 727046805b
Some checks failed
continuous-integration/drone/push Build is failing
fix: Dockerfile can not build.
2022-10-09 00:23:16 +08:00

16 lines
361 B
Docker

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