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
|
|
|
|
COPY package-lock.json package.json ./
|
2022-10-07 22:20:15 +08:00
|
|
|
RUN npm ci --no-audit --legacy-peer-deps
|
2022-07-18 20:50:38 +08:00
|
|
|
COPY . .
|
|
|
|
|
|
|
|
FROM node:16-alpine as release
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=base /app ./
|
|
|
|
RUN npm run build &&\
|
2022-10-07 23:58:05 +08:00
|
|
|
npm prune --omit dev --legacy-peer-deps
|
2022-07-18 20:50:38 +08:00
|
|
|
EXPOSE 80
|
|
|
|
CMD npm run serve -- --port 80
|