ci: 添加国内镜像代理和 BuildKit 缓存优化构建速度
This commit is contained in:
@@ -3,6 +3,9 @@ FROM golang:1.26-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 使用国内 Go 代理
|
||||
ENV GOPROXY=https://goproxy.cn,https://goproxy.io,direct
|
||||
|
||||
# 先复制依赖清单,利用 Docker 缓存层
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
Reference in New Issue
Block a user