Describe the issue
docker build failed
[2025-07-04 16:47:57] #9 70.30 npm error path /usr/src/app/node_modules/onnxruntime-node
[2025-07-04 16:47:57] #9 70.30 npm error command failed
[2025-07-04 16:47:57] #9 70.30 npm error command sh -c node ./script/install
[2025-07-04 16:47:57] #9 70.30 npm error /usr/src/app/node_modules/onnxruntime-node/script/install-utils.js:57
[2025-07-04 16:47:57] #9 70.30 npm error reject(new Error(Failed to download build list. HTTP status code = ${statusCode}));
[2025-07-04 16:47:57] #9 70.30 npm error ^
[2025-07-04 16:47:57] #9 70.30 npm error
[2025-07-04 16:47:57] #9 70.30 npm error Error: Failed to download build list. HTTP status code = 302
[2025-07-04 16:47:57] #9 70.30 npm error at ClientRequest. (/usr/src/app/node_modules/onnxruntime-node/script/install-utils.js:57:18)
Urgency
Urgent! can not build.
Target platform
Ubuntu22.04-Docker26
Build script
FROM node:22
WORKDIR /usr/src/app
RUN apt-get update &&
apt-get install -y wget python3 make g++ git ca-certificates &&
rm -rf /var/lib/apt/lists/*
RUN wget https://github.com/microsoft/onnxruntime/releases/download/v1.22.0/onnxruntime-linux-x64-1.22.0.tgz -P /tmp &&
mkdir -p /usr/local/onnxruntime &&
tar -xzf /tmp/onnxruntime-linux-x64-1.22.0.tgz -C /usr/local/onnxruntime --strip-components=1 &&
rm /tmp/onnxruntime-*.tgz
ENV ONNXRUNTIME_DOWNLOAD_SKIP=1
ENV ONNXRUNTIME_HOME=/usr/local/onnxruntime
COPY package.json package-lock.json* ./
RUN npm install --unsafe-perm onnxruntime-node@1.22.0
COPY ./run ./
COPY . .
RUN ./run docker:build
WORKDIR /usr/src/app/packages/api
ENV NODE_ENV=production
CMD ["npm", "run", "start:prod"]
关键修复点说明
Error / output
[2025-07-04 16:47:57] #9 70.30 npm error path /usr/src/app/node_modules/onnxruntime-node
[2025-07-04 16:47:57] #9 70.30 npm error command failed
[2025-07-04 16:47:57] #9 70.30 npm error command sh -c node ./script/install
[2025-07-04 16:47:57] #9 70.30 npm error /usr/src/app/node_modules/onnxruntime-node/script/install-utils.js:57
[2025-07-04 16:47:57] #9 70.30 npm error reject(new Error(Failed to download build list. HTTP status code = ${statusCode}));
[2025-07-04 16:47:57] #9 70.30 npm error ^
[2025-07-04 16:47:57] #9 70.30 npm error
[2025-07-04 16:47:57] #9 70.30 npm error Error: Failed to download build list. HTTP status code = 302
[2025-07-04 16:47:57] #9 70.30 npm error at ClientRequest. (/usr/src/app/node_modules/onnxruntime-node/script/install-utils.js:57:18)
Visual Studio Version
No response
GCC / Compiler Version
No response
Describe the issue
docker build failed
[2025-07-04 16:47:57] #9 70.30 npm error path /usr/src/app/node_modules/onnxruntime-node
[2025-07-04 16:47:57] #9 70.30 npm error command failed
[2025-07-04 16:47:57] #9 70.30 npm error command sh -c node ./script/install
[2025-07-04 16:47:57] #9 70.30 npm error /usr/src/app/node_modules/onnxruntime-node/script/install-utils.js:57
[2025-07-04 16:47:57] #9 70.30 npm error reject(new Error(
Failed to download build list. HTTP status code = ${statusCode}));[2025-07-04 16:47:57] #9 70.30 npm error ^
[2025-07-04 16:47:57] #9 70.30 npm error
[2025-07-04 16:47:57] #9 70.30 npm error Error: Failed to download build list. HTTP status code = 302
[2025-07-04 16:47:57] #9 70.30 npm error at ClientRequest. (/usr/src/app/node_modules/onnxruntime-node/script/install-utils.js:57:18)
Urgency
Urgent! can not build.
Target platform
Ubuntu22.04-Docker26
Build script
FROM node:22
WORKDIR /usr/src/app
RUN apt-get update &&
apt-get install -y wget python3 make g++ git ca-certificates &&
rm -rf /var/lib/apt/lists/*
RUN wget https://github.com/microsoft/onnxruntime/releases/download/v1.22.0/onnxruntime-linux-x64-1.22.0.tgz -P /tmp &&
mkdir -p /usr/local/onnxruntime &&
tar -xzf /tmp/onnxruntime-linux-x64-1.22.0.tgz -C /usr/local/onnxruntime --strip-components=1 &&
rm /tmp/onnxruntime-*.tgz
ENV ONNXRUNTIME_DOWNLOAD_SKIP=1
ENV ONNXRUNTIME_HOME=/usr/local/onnxruntime
COPY package.json package-lock.json* ./
RUN npm install --unsafe-perm onnxruntime-node@1.22.0
COPY ./run ./
COPY . .
RUN ./run docker:build
WORKDIR /usr/src/app/packages/api
ENV NODE_ENV=production
CMD ["npm", "run", "start:prod"]
关键修复点说明
Error / output
[2025-07-04 16:47:57] #9 70.30 npm error path /usr/src/app/node_modules/onnxruntime-node
[2025-07-04 16:47:57] #9 70.30 npm error command failed
[2025-07-04 16:47:57] #9 70.30 npm error command sh -c node ./script/install
[2025-07-04 16:47:57] #9 70.30 npm error /usr/src/app/node_modules/onnxruntime-node/script/install-utils.js:57
[2025-07-04 16:47:57] #9 70.30 npm error reject(new Error(
Failed to download build list. HTTP status code = ${statusCode}));[2025-07-04 16:47:57] #9 70.30 npm error ^
[2025-07-04 16:47:57] #9 70.30 npm error
[2025-07-04 16:47:57] #9 70.30 npm error Error: Failed to download build list. HTTP status code = 302
[2025-07-04 16:47:57] #9 70.30 npm error at ClientRequest. (/usr/src/app/node_modules/onnxruntime-node/script/install-utils.js:57:18)
Visual Studio Version
No response
GCC / Compiler Version
No response