From 627ca54c65e7ffaf2e17e3fe84e3b4f7859b6a55 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 19 Jan 2026 17:08:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9B=BD=E5=86=85=20Go=20?= =?UTF-8?q?=E4=BB=A3=E7=90=86=E5=8A=A0=E9=80=9F=E4=BE=9D=E8=B5=96=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile.api | 4 ++++ Dockerfile.worker | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Dockerfile.api b/Dockerfile.api index 9c18845..e2c5454 100644 --- a/Dockerfile.api +++ b/Dockerfile.api @@ -11,6 +11,10 @@ RUN apk add --no-cache git ca-certificates tzdata # 复制 go.mod 和 go.sum(利用 Docker 缓存) COPY go.mod go.sum ./ + +# 使用国内 Go 代理加速依赖下载 +ENV GOPROXY=https://goproxy.cn,direct + RUN go mod download # 复制源代码 diff --git a/Dockerfile.worker b/Dockerfile.worker index 8c57b2c..8cc411f 100644 --- a/Dockerfile.worker +++ b/Dockerfile.worker @@ -11,6 +11,10 @@ RUN apk add --no-cache git ca-certificates tzdata # 复制 go.mod 和 go.sum(利用 Docker 缓存) COPY go.mod go.sum ./ + +# 使用国内 Go 代理加速依赖下载 +ENV GOPROXY=https://goproxy.cn,direct + RUN go mod download # 复制源代码