From e50b782361ab04e907dfa118990cc4bb87479123 Mon Sep 17 00:00:00 2001 From: zl Date: Mon, 17 Nov 2025 12:12:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20Docker=20=E9=95=9C?= =?UTF-8?q?=E5=83=8F=E7=89=88=E6=9C=AC=E6=A0=87=E7=AD=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新 Dockerfile.simple 使用动态构建参数 - 确保镜像标签信息与实际版本一致 - 支持正确的版本号、构建时间和 Git 提交信息 --- Dockerfile.simple | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Dockerfile.simple b/Dockerfile.simple index 560ae4e..aa5c81e 100644 --- a/Dockerfile.simple +++ b/Dockerfile.simple @@ -33,12 +33,17 @@ HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ # 启动nginx CMD ["nginx", "-g", "daemon off;"] +# 定义构建参数 +ARG VERSION=latest +ARG BUILD_DATE +ARG VCS_REF + # 添加标签信息 LABEL maintainer="walllee" \ org.opencontainers.image.title="Moodist" \ org.opencontainers.image.description="Ambient sounds for focus and calm - 多语言环境音应用" \ - org.opencontainers.image.version="2.1.0" \ - org.opencontainers.image.created="2025-11-16T06:53:40Z" \ - org.opencontainers.image.revision="65958f8" \ + org.opencontainers.image.version="${VERSION}" \ + org.opencontainers.image.created="${BUILD_DATE}" \ + org.opencontainers.image.revision="${VCS_REF}" \ org.opencontainers.image.source="https://github.com/wheesys/moodist" \ org.opencontainers.image.licenses="MIT" \ No newline at end of file