From 2e2ca812a1774a95c9140d0e9c7e00359d3a320f Mon Sep 17 00:00:00 2001 From: gooker_young Date: Fri, 3 Jul 2026 13:39:57 +0800 Subject: [PATCH] =?UTF-8?q?build(Dockerfile):=20=E5=AE=89=E8=A3=85Node.js?= =?UTF-8?q?=2020.x=E4=BB=A5=E6=94=AF=E6=8C=81actions/checkout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 为了满足actions/checkout的运行依赖,在Docker镜像中新增安装Node.js 20版本,并验证安装正常 --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index e642082..fb91297 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,6 +34,11 @@ RUN mkdir -p /etc/pip \ RUN pip install --no-cache-dir uv -i https://mirrors.aliyun.com/pypi/simple/ \ && uv python install 3.8 3.13 +# 安装 Node.js 20.x(actions/checkout 需要) +RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ + apt-get install -y nodejs && \ + node --version + # 预装项目 dev 依赖(仅复制依赖描述文件,利用 Docker 层缓存) WORKDIR /workspace COPY pyproject.toml tox.ini README.md ./