diff --git a/Dockerfile b/Dockerfile index f0d54c3..766e31d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,9 @@ FROM golang:1.25-alpine AS builder ENV CGO_ENABLED=0 ENV GO111MODULE=on -ENV GOPROXY=https://goproxy.cn,direct +# 使用多个国内 Go 代理镜像源,提高可用性和速度 +# 顺序:goproxy.cn(七牛云) -> goproxy.io -> mirrors.aliyun.com(阿里云) -> direct(直连) +ENV GOPROXY=https://goproxy.cn,https://goproxy.io,https://mirrors.aliyun.com/goproxy/,direct # 确保 PATH 包含 Go bin 目录,以便 protoc 能找到插件 ENV PATH=$PATH:/go/bin # 配置 Alpine 国内镜像源(阿里云)