fix: 代理地址改为 172.17.0.1(Linux Docker 网桥网关)
This commit is contained in:
@@ -4,6 +4,12 @@
|
|||||||
|
|
||||||
FROM node:22-slim AS builder
|
FROM node:22-slim AS builder
|
||||||
|
|
||||||
|
# Proxy for downloading dependencies (passed via --build-arg)
|
||||||
|
ARG HTTP_PROXY
|
||||||
|
ARG HTTPS_PROXY
|
||||||
|
ENV HTTP_PROXY=${HTTP_PROXY} \
|
||||||
|
HTTPS_PROXY=${HTTPS_PROXY}
|
||||||
|
|
||||||
# China npm mirror
|
# China npm mirror
|
||||||
RUN npm config set registry https://registry.npmmirror.com
|
RUN npm config set registry https://registry.npmmirror.com
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -18,7 +18,7 @@ pipeline {
|
|||||||
|
|
||||||
stage('Build Docker Image') {
|
stage('Build Docker Image') {
|
||||||
steps {
|
steps {
|
||||||
sh "docker build --build-arg HTTP_PROXY=http://host.docker.internal:7897 --build-arg HTTPS_PROXY=http://host.docker.internal:7897 -t ${APP_NAME}:${BUILD_NUMBER} -t ${APP_NAME}:latest ."
|
sh "docker build --build-arg HTTP_PROXY=http://172.17.0.1:7897 --build-arg HTTPS_PROXY=http://172.17.0.1:7897 -t ${APP_NAME}:${BUILD_NUMBER} -t ${APP_NAME}:latest ."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user