From b1f3a02fb09eaab9f10a307cfa4cfc15b89d8131 Mon Sep 17 00:00:00 2001 From: Developer Date: Wed, 3 Dec 2025 17:15:43 -0800 Subject: [PATCH] =?UTF-8?q?fix(mpc-system):=20=E6=B7=BB=E5=8A=A0=20Go=20?= =?UTF-8?q?=E4=BB=A3=E7=90=86=E9=85=8D=E7=BD=AE=E8=A7=A3=E5=86=B3=E7=BD=91?= =?UTF-8?q?=E7=BB=9C=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在所有 Dockerfile 中添加 GOPROXY 配置: - 使用 goproxy.cn 和 goproxy.io 作为国内代理 - 使用 sum.golang.google.cn 作为 GOSUMDB - 支持通过 build args 覆盖代理设置 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- backend/mpc-system/services/account/Dockerfile | 5 +++++ backend/mpc-system/services/message-router/Dockerfile | 5 +++++ backend/mpc-system/services/server-party/Dockerfile | 5 +++++ backend/mpc-system/services/session-coordinator/Dockerfile | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/backend/mpc-system/services/account/Dockerfile b/backend/mpc-system/services/account/Dockerfile index e8add4d6..aff324d8 100644 --- a/backend/mpc-system/services/account/Dockerfile +++ b/backend/mpc-system/services/account/Dockerfile @@ -3,6 +3,11 @@ FROM golang:1.21-alpine AS builder RUN apk add --no-cache git ca-certificates +# Set Go proxy for China +ARG GOPROXY=https://goproxy.cn,https://goproxy.io,direct +ENV GOPROXY=${GOPROXY} +ENV GOSUMDB=sum.golang.google.cn + WORKDIR /app COPY go.mod go.sum ./ diff --git a/backend/mpc-system/services/message-router/Dockerfile b/backend/mpc-system/services/message-router/Dockerfile index ec5b4c92..d47a3682 100644 --- a/backend/mpc-system/services/message-router/Dockerfile +++ b/backend/mpc-system/services/message-router/Dockerfile @@ -3,6 +3,11 @@ FROM golang:1.21-alpine AS builder RUN apk add --no-cache git ca-certificates +# Set Go proxy for China +ARG GOPROXY=https://goproxy.cn,https://goproxy.io,direct +ENV GOPROXY=${GOPROXY} +ENV GOSUMDB=sum.golang.google.cn + WORKDIR /app COPY go.mod go.sum ./ diff --git a/backend/mpc-system/services/server-party/Dockerfile b/backend/mpc-system/services/server-party/Dockerfile index 2134fc26..876ffb09 100644 --- a/backend/mpc-system/services/server-party/Dockerfile +++ b/backend/mpc-system/services/server-party/Dockerfile @@ -3,6 +3,11 @@ FROM golang:1.21-alpine AS builder RUN apk add --no-cache git ca-certificates +# Set Go proxy for China +ARG GOPROXY=https://goproxy.cn,https://goproxy.io,direct +ENV GOPROXY=${GOPROXY} +ENV GOSUMDB=sum.golang.google.cn + WORKDIR /app COPY go.mod go.sum ./ diff --git a/backend/mpc-system/services/session-coordinator/Dockerfile b/backend/mpc-system/services/session-coordinator/Dockerfile index c5086357..478eca5a 100644 --- a/backend/mpc-system/services/session-coordinator/Dockerfile +++ b/backend/mpc-system/services/session-coordinator/Dockerfile @@ -4,6 +4,11 @@ FROM golang:1.21-alpine AS builder # Install dependencies RUN apk add --no-cache git ca-certificates +# Set Go proxy for China (use GOPROXY env from build args if provided) +ARG GOPROXY=https://goproxy.cn,https://goproxy.io,direct +ENV GOPROXY=${GOPROXY} +ENV GOSUMDB=sum.golang.google.cn + # Set working directory WORKDIR /app