2022-07-16 14:29:06 +08:00
|
|
|
FROM node:16-alpine as base
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package-lock.json package.json ./
|
|
|
|
RUN npm ci --no-audit --legacy-peer-deps
|
|
|
|
COPY . .
|
2022-07-17 11:23:39 +08:00
|
|
|
|
2022-07-16 14:29:06 +08:00
|
|
|
FROM node:16-alpine as release
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=base /app ./
|
|
|
|
RUN npm run build &&\
|
|
|
|
npm prune --omit dev
|
|
|
|
EXPOSE 80
|
|
|
|
CMD npm run serve -- -H 0.0.0.0 -p 80
|