Commit 49de7979 by zhangxingmin

push

parent a80aef04
...@@ -6,14 +6,12 @@ WORKDIR /app ...@@ -6,14 +6,12 @@ WORKDIR /app
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
&& apk add --no-cache python3 make g++ && apk add --no-cache python3 make g++
# 只复制package.json(避免lockfile版本冲突) # 只复制package.json(避免lockfile冲突)
COPY package.json ./ COPY package.json ./
# 关键:先验证版本是否存在,不存在则切换官方源重试 # 关键:强制使用npm官方源(确保能找到2.x版本)+ 清理缓存
RUN npm config set registry https://registry.npmmirror.com \ RUN npm config set registry https://registry.npmjs.org \
&& npm config set disturl https://npmmirror.com/dist \ && npm cache clean --force \
# 验证uni-app版本是否存在,不存在则切换官方源
&& (npm view @dcloudio/uni-app@2.0.0-30920220418001 version >/dev/null 2>&1 || npm config set registry https://registry.npmjs.org) \
&& npm install --legacy-peer-deps && npm install --legacy-peer-deps
# 复制源代码并构建 # 复制源代码并构建
......
...@@ -27,12 +27,12 @@ ...@@ -27,12 +27,12 @@
"js-sha256": "^0.11.1", "js-sha256": "^0.11.1",
"nanoid": "^4.0.0", "nanoid": "^4.0.0",
"vue": "^2.6.14", "vue": "^2.6.14",
"@dcloudio/uni-app": "2.0.0-30920220418001" "@dcloudio/uni-app": "^2.0.0"
}, },
"devDependencies": { "devDependencies": {
"@dcloudio/uni-h5": "2.0.0-30920220418001", "@dcloudio/uni-h5": "^2.0.0",
"@dcloudio/uni-cli-service": "2.0.0-30920220418001", "@dcloudio/uni-cli-service": "^2.0.0",
"@dcloudio/vue-cli-plugin-uni": "2.0.0-30920220418001", "@dcloudio/vue-cli-plugin-uni": "^2.0.0",
"less": "^4.3.0" "less": "^4.3.0"
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment