From f9fc35bad30f45496b08953410cf0491d509b7d7 Mon Sep 17 00:00:00 2001 From: titor Date: Wed, 15 Apr 2026 21:25:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=20Go=20=E5=92=8C=20ap?= =?UTF-8?q?k=20=E5=9B=BD=E5=86=85=E4=BB=A3=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index d32c5df..d4bd0fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,10 @@ FROM golang:latest-alpine AS builder # 设置工作目录 WORKDIR /build +# 设置 Go 国内代理 +ENV GOPROXY=https://goproxy.cn,direct +ENV GO111MODULE=on + # 复制依赖文件 COPY go.mod go.sum ./ RUN go mod download @@ -24,6 +28,10 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o ttychart-mcp . # 最终镜像 FROM alpine:latest +# 设置 apk 国内镜像源 +RUN echo 'https://mirrors.aliyun.com/alpine/v3.15/main' > /etc/apk/repositories && \ + echo 'https://mirrors.aliyun.com/alpine/v3.15/community' >> /etc/apk/repositories + # 安装 ca-certificates 用于 HTTPS RUN apk --no-cache add ca-certificates