This commit is contained in:
2026-02-06 09:31:43 +00:00
parent c3847a970e
commit f3c2510a24
4 changed files with 18 additions and 4 deletions

View File

@@ -52,7 +52,13 @@ ENV PATH="$PNPM_HOME:$PATH"
# Install Node.js LTS via NVM and pnpm
# Use musl-specific builds from unofficial-builds for Alpine compatibility
RUN nvm install $NODE_VERSION_LTS \
# TARGETARCH fix: QEMU buildx can report wrong arch via uname -m, causing NVM
# to download x64 binaries on arm64. We create a temporary uname wrapper to
# ensure the correct architecture binary is downloaded.
ARG TARGETARCH
RUN NVM_MUSL_ARCH=$([ "$TARGETARCH" = "arm64" ] && echo "arm64-musl" || echo "x64-musl") \
&& nvm_get_arch() { echo "$NVM_MUSL_ARCH"; } \
&& nvm install $NODE_VERSION_LTS \
&& nvm alias default $NODE_VERSION_LTS \
&& nvm use default \
&& npm install -g pnpm \