blob: 48ad7b17b2a81e1b144afe5fa1f917f45878b54a [file] [log] [blame] [edit]
# Build stage
#FROM registry.cn-hangzhou.aliyuncs.com/library/node:18-alpine as build-stage
FROM node:18-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY .. .
RUN npm run build
# Production stage
#FROM registry.cn-hangzhou.aliyuncs.com/library/nginx:stable-alpine as production-stage
FROM nginx:stable-alpine AS base
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]