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:
+1
-1
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user