Fix: Configure Go proxy for faster dependency downloads

- Added GOPROXY=https://goproxy.cn,direct for Chinese mirror
- Added GOSUMDB=sum.golang.google.cn for checksum database
- Fixes timeout issues when downloading Go modules during CI/CD build
- Resolves build failure due to network connectivity to proxy.golang.org

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root 2025-12-19 10:09:18 +08:00
parent 0fb7557c27
commit 79162a4205
2 changed files with 4 additions and 15 deletions

View File

@ -6,6 +6,10 @@ WORKDIR /app
# Install Go # Install Go
RUN apk add --no-cache go RUN apk add --no-cache go
# Configure Go proxy for faster downloads
ENV GOPROXY=https://goproxy.cn,direct
ENV GOSUMDB=sum.golang.google.cn
# Copy go mod and sum files # Copy go mod and sum files
COPY go.mod go.sum ./ COPY go.mod go.sum ./

View File

@ -1,15 +0,0 @@
@echo off
echo 登录到私有仓库...
docker login 192.168.1.154:31010 -u docker -p dockerxn001624.
echo.
echo 推送 alpine:latest...
docker push 192.168.1.154:31010/alpine:latest
echo.
echo 推送 docker/compose:latest...
docker push 192.168.1.154:31010/docker/compose:latest
echo.
echo 推送完成!
pause