fix(mpc-system): 添加 Go 代理配置解决网络问题
在所有 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 <noreply@anthropic.com>
This commit is contained in:
parent
d9f6c24b18
commit
b1f3a02fb0
|
|
@ -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 ./
|
||||
|
|
|
|||
|
|
@ -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 ./
|
||||
|
|
|
|||
|
|
@ -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 ./
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue