From f5ca6e9bddda7c9b3165979b78b9f7a05897c9c9 Mon Sep 17 00:00:00 2001 From: Connor <963408438@qq.com> Date: Mon, 12 Jan 2026 22:47:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=20Go=20=E4=BB=A3=E7=90=86?= =?UTF-8?q?=EF=BC=88=E5=9B=BD=E5=86=85=E9=95=9C=E5=83=8F=E5=8A=A0=E9=80=9F?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 9ad216c..3eca63a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,10 @@ RUN npm run build # ==================== 阶段2: 构建后端 ==================== FROM golang:1.23-alpine AS backend-builder +# 配置 Go 代理(国内镜像加速) +ENV GOPROXY=https://goproxy.cn,direct \ + GO111MODULE=on + # 安装必要的构建工具(包括 gcc、musl-dev 和 sqlite-dev 用于 CGO) RUN apk add --no-cache \ git \