tailwind-nextjs-blog/Dockerfile
Ivan Li e64ece00ab
All checks were successful
continuous-integration/drone/push Build is passing
fix: 修复 CI 清理 dev deps 失败。
2022-10-07 23:58:05 +08:00

14 lines
340 B
Docker

FROM node:16-alpine as base
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package-lock.json package.json ./
RUN npm ci --no-audit --legacy-peer-deps
COPY . .
FROM node:16-alpine as release
WORKDIR /app
COPY --from=base /app ./
RUN npm run build &&\
npm prune --omit dev --legacy-peer-deps
EXPOSE 80
CMD npm run serve -- --port 80