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