build: add Node.js 24 to java-builder for actions/checkout support

Gitea Actions checkout@v6 requires Node.js to run. Added Node 24
via NodeSource apt repo (~30MB).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
main
Fadhli Azhari 2026-04-14 17:05:57 +08:00
parent 236c2ff3ee
commit 2f9e35d0eb
1 changed files with 11 additions and 1 deletions

View File

@ -18,11 +18,21 @@ ARG OWASP_DC_VERSION=12.1.0
# ─────────────────────────────────────────────────────────────────────
# System dependencies
# ─────────────────────────────────────────────────────────────────────
ARG NODE_MAJOR=24
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
gnupg \
jq \
unzip \
&& mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
| gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" \
> /etc/apt/sources.list.d/nodesource.list \
&& apt-get update && apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
# ─────────────────────────────────────────────────────────────────────
@ -62,4 +72,4 @@ RUN curl -fsSL "https://github.com/oras-project/oras/releases/download/v${ORAS_V
WORKDIR /workspace
# Verify installation
RUN java -version && mvn -version && oras version && jq --version
RUN java -version && mvn -version && node --version && oras version && jq --version