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