fix(build): address follow-up Copilot review on NodeSource step

- remove NodeSource repo/key after Node install
- avoid duplicate node -v call via NODE_VERSION variable
This commit is contained in:
root
2026-03-07 15:38:45 +02:00
parent 7d8f7d524d
commit 60fb692e7d
+4 -2
View File
@@ -43,8 +43,10 @@ RUN mkdir -p /etc/apt/keyrings \
> /etc/apt/sources.list.d/nodesource.list \ > /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \ && apt-get update \
&& apt-get install -y --no-install-recommends nodejs \ && apt-get install -y --no-install-recommends nodejs \
&& node -v \ && NODE_VERSION="$(node -v)" \
&& node -v | grep -E '^v22\.' \ && echo "$NODE_VERSION" \
&& echo "$NODE_VERSION" | grep -E '^v22\.' \
&& rm -f /etc/apt/sources.list.d/nodesource.list /etc/apt/keyrings/nodesource.gpg \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*