执行RUN npm install --registry https://registry.npm.taobao.org
报错
> [build-stage 5/6] RUN npm install --registry https://registry.npm.taobao.org:
6.230 npm ERR! code CERT_HAS_EXPIRED
6.231 npm ERR! errno CERT_HAS_EXPIRED
6.241 npm ERR! request to https://registry.npm.taobao.org/vue-loader failed, reason: certificate has expired
6.274
6.274 npm ERR! A complete log of this run can be found in:
6.274 npm ERR! /root/.npm/_logs/2024-01-31T06_17_26_469Z-debug.log
------
Dockerfile:8
--------------------
6 | # 根据设置,替换favicon
7 | RUN chmod +x change_favicon.sh && sh change_favicon.sh -m $MODE
8 | >>> RUN npm install --registry https://registry.npm.taobao.org
9 | RUN npm run build -- --mode $MODE
10 |
--------------------
ERROR: failed to solve: process "/bin/sh -c npm install --registry https://registry.npm.taobao.org" did not complete successfully: exit code: 1
发现那个镜像源过期了,换成下边这个重新打包可以了
RUN npm install --registry https://registry.npmmirror.com