From ddc9533f210f5541dabc851be429cd5bfcbb755f Mon Sep 17 00:00:00 2001 From: hex2077 Date: Wed, 7 Jan 2026 23:16:42 +0800 Subject: [PATCH] =?UTF-8?q?build(Dockerfile):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E7=9A=84=E7=B3=BB=E7=BB=9F=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E5=B9=B6=E4=BC=98=E5=8C=96=E4=BE=9D=E8=B5=96=E5=AE=89=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加 tar 和 git 工具以支持更新功能和版本检查,同时保持 npm install 命令的简洁性 --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 13ef61e..776baa7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,9 @@ FROM node:20-alpine LABEL maintainer="AIClient2API Team" LABEL description="Docker image for AIClient2API server" +# 安装必要的系统工具(tar 用于更新功能,git 用于版本检查) +RUN apk add --no-cache tar git + # 设置工作目录 WORKDIR /app @@ -15,7 +18,7 @@ COPY package*.json ./ # 安装依赖 # 使用--production标志只安装生产依赖,减小镜像大小 # 使用--omit=dev来排除开发依赖 -RUN npm install +RUN npm install # 复制源代码 COPY . .