优化 Docker 构建:启用 BuildKit + 使用阿里云 Alpine 镜像源加速
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Failing after 4s

This commit is contained in:
2026-01-20 09:33:24 +08:00
parent 20a80982fe
commit 2336b140cc
3 changed files with 11 additions and 5 deletions

View File

@@ -31,6 +31,9 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build \
# ================================
FROM alpine:3.19
# 使用阿里云镜像源加速
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
# 安装运行时依赖
RUN apk add --no-cache ca-certificates tzdata bash