tailwind-nextjs-blog/Dockerfile

15 lines
341 B
Docker
Raw Normal View History

2022-07-18 20:50:38 +08:00
FROM node:16-alpine as base
2022-07-18 22:34:27 +08:00
RUN apk add --no-cache libc6-compat
2022-07-18 20:50:38 +08:00
WORKDIR /app
2022-10-09 00:23:16 +08:00
COPY pnpm-lock.yaml package.json ./
RUN npm i --location=global pnpm@7 &&\
pnpm i
2022-10-09 13:04:51 +08:00
COPY . .
RUN pnpm build &&\
2022-10-09 13:07:02 +08:00
pnpm prune --prod --config.ignore-scripts=true
2022-07-18 20:50:38 +08:00
FROM node:16-alpine as release
2022-07-18 20:50:38 +08:00
WORKDIR /app
COPY --from=base /app ./
EXPOSE 80
2022-10-09 13:16:25 +08:00
CMD npm run serve -p 80