diff --git a/hw_service_go/Dockerfile b/hw_service_go/Dockerfile index 58b0e93..e82611a 100644 --- a/hw_service_go/Dockerfile +++ b/hw_service_go/Dockerfile @@ -12,6 +12,9 @@ RUN apk add --no-cache gcc musl-dev opus-dev WORKDIR /app +# 使用国内镜像加速,避免 proxy.golang.org 超时 +ENV GOPROXY=https://goproxy.cn,direct + # 先拷贝 go.mod/go.sum 利用 Docker 层缓存(依赖未变时跳过 go mod download) COPY go.mod go.sum ./ RUN go mod download