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 <noreply@anthropic.com>
This commit is contained in:
+8
-3
@@ -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 ./
|
||||
|
||||
Reference in New Issue
Block a user