This commit is contained in:
@@ -8,8 +8,8 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
# 安装 pnpm,显式指定镜像源,避免继承开发机不可用的 npm 代理
|
||||
RUN npm install --global pnpm@10.15.0 --registry=https://registry.npmmirror.com
|
||||
# 清除宿主机注入的失效代理,再安装 pnpm
|
||||
RUN npm config delete proxy && npm config delete https-proxy && npm install --global pnpm@10.15.0 --registry=https://registry.npmmirror.com
|
||||
RUN pnpm config set registry https://registry.npmmirror.com
|
||||
|
||||
# 限制 Node 堆,防止前端构建耗尽宿主机内存
|
||||
|
||||
@@ -104,6 +104,12 @@ async function buildAndPush({ branch, sha, repoRoot }) {
|
||||
'--platform',
|
||||
'linux/amd64',
|
||||
'--build-arg',
|
||||
'HTTP_PROXY=',
|
||||
'--build-arg',
|
||||
'HTTPS_PROXY=',
|
||||
'--build-arg',
|
||||
'ALL_PROXY=',
|
||||
'--build-arg',
|
||||
`NODE_OPTIONS=${NODE_OPTIONS}`,
|
||||
'--tag',
|
||||
`${IMAGE_NAME}:${imageTag}`,
|
||||
|
||||
Reference in New Issue
Block a user