# 多阶段构建 FROM node:14 as build COPY . /app WORKDIR /app RUN npm config set registry https://registry.npmmirror.com \ && npm install \ && npm run build:prod FROM nginx:alpine COPY --from=build /app/dist /app/www COPY ./web.conf /etc/nginx/conf.d/default.conf