Merge pull request #26 from KenGrofork/patch-1

避免国内编译失败,提升编译速度
This commit is contained in:
vastxie 2024-05-21 22:43:00 +08:00 committed by GitHub
commit 5c8c8ffc01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,16 +7,12 @@ COPY package.json ./
# 使用腾讯源(国内服务器可取消下方注释以提升安装速度)
# RUN npm config set registry https://mirrors.cloud.tencent.com/npm/
# 使用淘宝源(国内服务器可取消下方注释以提升安装速度)
# RUN npm config set registry https://registry.npmmirror.com
# 如遇到提示网站证书无效取消下方注释禁止严格SS策略
# RUN npm config set strict-ssl false
# 安装项目依赖
RUN apk add --no-cache --virtual .build-deps git && \
npm install --omit=dev && \
apk del .build-deps
# 使用淘宝源安装项目依赖(国内用户居多)
RUN npm config set registry https://registry.npmmirror.com && \
npm install --omit=dev
# 运行阶段