From ed1f7d8301345a19cd02b433120563a3dee61f4f Mon Sep 17 00:00:00 2001 From: ekko <152005280+EKKOLearnAI@users.noreply.github.com> Date: Tue, 21 Apr 2026 15:36:47 +0800 Subject: [PATCH] fix(docker): split RUN steps to fix Node.js install on multi-platform build (#108) Separate apt-get install from Node.js download into two RUN layers. The piped curl|tar command fails with 404 when ca-certificates from apt layer is not yet available during parallel multi-platform build. Co-authored-by: Claude Opus 4.6 --- Dockerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4eba6aa..0d42b64 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,11 +8,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ curl \ make \ g++ \ - && ARCH=$(dpkg --print-architecture) \ - && curl -fsSL "https://nodejs.org/dist/v23.11.0/node-v23.11.0-linux-${ARCH}.tar.gz" \ - | tar -xz -C /usr/local --strip-components=1 \ && rm -rf /var/lib/apt/lists/* +RUN ARCH=$(dpkg --print-architecture) \ + && echo "Downloading Node.js v23.11.0 for ${ARCH}" \ + && curl -fsSL "https://nodejs.org/dist/v23.11.0/node-v23.11.0-linux-${ARCH}.tar.gz" \ + -o /tmp/node.tar.gz \ + && tar -xzf /tmp/node.tar.gz -C /usr/local --strip-components=1 \ + && rm -f /tmp/node.tar.gz \ + && node --version + WORKDIR /app COPY package*.json ./