fix(docker): use if/else to map amd64 to x64 for Node.js download (#110)

dpkg returns 'amd64' but nodejs.org uses 'x64' in tarball filenames.
Shell substitution may not work in all shells, use explicit if/else.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ekko
2026-04-21 16:11:40 +08:00
committed by GitHub
parent fd02c01148
commit 81dad4c939
+1 -1
View File
@@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
RUN ARCH=$(dpkg --print-architecture) \
&& NODE_ARCH=${ARCH/amd64/x64} \
&& if [ "$ARCH" = "amd64" ]; then NODE_ARCH="x64"; else NODE_ARCH="$ARCH"; fi \
&& echo "Downloading Node.js v23.11.0 for ${NODE_ARCH}" \
&& curl -fsSL "https://nodejs.org/dist/v23.11.0/node-v23.11.0-linux-${NODE_ARCH}.tar.gz" \
-o /tmp/node.tar.gz \