This commit is contained in:
2026-08-24 13:26:15 +08:00
parent 961523d94c
commit 75d3e93e6e
3 changed files with 10 additions and 3 deletions
+4
View File
@@ -1,6 +1,10 @@
# 视野后端构建:多阶段编译 → 精简运行镜像(纯 Go + SQLite,无 CGO 依赖)
FROM golang:1.26 AS builder
# 国内网络 proxy.golang.org 不通,默认走 goproxy.cn;构建时可用 --build-arg 覆盖
ARG GOPROXY=https://goproxy.cn,direct
ENV GOPROXY=${GOPROXY}
WORKDIR /build
# 依赖层缓存:go.mod/go.sum 变更才重拉依赖
COPY go.mod go.sum ./