Ver código fonte

feat: 完成了SonarQube静态代码测试的前端代码

claws 4 anos atrás
pai
commit
6e64f288b8
1 arquivos alterados com 11 adições e 0 exclusões
  1. 11 0
      Dockerfile

+ 11 - 0
Dockerfile

@@ -0,0 +1,11 @@
+FROM node:12-alpine as builder
+WORKDIR /code
+RUN yarn config set registry https://registry.npm.taobao.org/
+ADD package.json /code
+ADD yarn.lock /code
+RUN yarn install
+ADD . /code
+RUN yarn build:prod
+
+FROM nginx:1.19-alpine
+COPY --from=builder /code/dist/ /var/www/html/dist/