From 77bea1e99e418b94e42b04e5fd42f8bddda58ec7 Mon Sep 17 00:00:00 2001 From: aixiao Date: Mon, 20 Oct 2025 11:55:37 +0800 Subject: [PATCH] =?UTF-8?q?build(Dockerfile):=20=E6=9B=B4=E6=96=B0=20Go=20?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=B9=B6=E5=A2=9E=E5=BC=BA=20DNS=20=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新基础镜像中的 Go 版本从 1.25.2 到 1.25.3。 添加黑名单文件支持,增加缓存大小到 5000, 并将最大并行数调整为 4。 --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e1e22c3..9a4e7b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # ---------- 构建阶段 ---------- -FROM golang:1.25.2-alpine AS builder +FROM golang:1.25.3-alpine AS builder WORKDIR /app COPY . . @@ -16,6 +16,7 @@ WORKDIR /app # 只复制编译好的二进制,不再打包证书 COPY --from=builder /app/dot /app/dot +COPY blacklist.txt /app/blacklist.txt # 运行时定义可覆盖的环境变量(不在构建时生效) ENV CERT_FILE=aixiao.me.cer @@ -31,4 +32,6 @@ ENTRYPOINT ["sh", "-c", "./dot \ -upstream \"119.29.29.29:53,223.5.5.5:53,114.114.114.114:53\" \ -cache-ttl 300s \ -timeout 3s \ - -max-parallel 3"] + -cache-size 50000 \ + -max-parallel 4 \ + -blacklist-file /app/blacklist.txt"]