FROM node:16 as builder COPY . /code WORKDIR /code RUN npm config set registry https://registry.npm.taobao.org RUN npm install RUN npm rebuild node-sass RUN npm run build-test FROM nginx COPY --from=builder /code/dist/ /usr/share/nginx/html/public/ COPY --from=builder /code/docs/conf/nginx.conf /etc/nginx/nginx.conf COPY --from=builder /code/docs/conf/conf.d/ /etc/nginx/conf.d/ ENTRYPOINT ["nginx","-g","daemon off;"]