浏览代码

更新 'Dockerfile'

使用npm安装项目依赖
ZhangYi2020 2 年之前
父节点
当前提交
5d49940c85
共有 1 个文件被更改,包括 2 次插入 和 3 次删除
  1. 2 3
      Dockerfile

+ 2 - 3
Dockerfile

@@ -1,10 +1,9 @@
 FROM node:16 as builder
 FROM node:16 as builder
 WORKDIR /code
 WORKDIR /code
-RUN yarn config set registry https://repo.nju.edu.cn/repository/npm/
-RUN yarn config set network-timeout 60000
+RUN npm config set registry https://registry.npmmirror.com
 ADD package.json /code
 ADD package.json /code
 ADD yarn.lock /code
 ADD yarn.lock /code
-RUN yarn install
+RUN npm install
 ADD . /code
 ADD . /code
 RUN yarn build:prod
 RUN yarn build:prod