From 3c166db41c72bb2387d3682e9cd788ae09528ad4 Mon Sep 17 00:00:00 2001 From: 3377 <35794406@qq.com> Date: Tue, 17 Dec 2024 17:40:19 +0800 Subject: [PATCH] fix: Fix version file handling in Dockerfile --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e98f49a..9b4e62e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,8 +12,10 @@ RUN go mod download # 复制源代码并构建 COPY . . -RUN go mod tidy -RUN go build -ldflags="-w -s" -o bot +RUN go mod tidy && \ + mkdir -p config && \ + cp version config/version && \ + go build -ldflags="-w -s" -o bot # 运行阶段 FROM alpine:latest