From 9b33b3f4fb0fc7f30f8e2d26406c00ca60816892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=96=8C?= <259278618@qq.com> Date: Mon, 3 Aug 2026 14:18:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Dockerfile=20=E6=8D=A2=E9=98=BF=E9=87=8C?= =?UTF-8?q?=E4=BA=91=20apk=20=E6=BA=90=EF=BC=8C=E9=81=BF=E5=85=8D=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E5=8D=A1=E6=AD=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e4d8c9d..40130ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,9 @@ # 阶段1: 构建 FROM golang:alpine AS builder -RUN apk add --no-cache git ca-certificates tzdata +# 换国内源,避免 apk 从官方源超时 +RUN sed -i 's|dl-cdn.alpinelinux.org|mirrors.aliyun.com|g' /etc/apk/repositories \ + && apk add --no-cache git ca-certificates tzdata ENV TZ=Asia/Shanghai RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone