From 5d57dff482a3ae541d711be56bfc726c7e8d2519 Mon Sep 17 00:00:00 2001 From: nanxun Date: Fri, 3 Jul 2026 18:04:53 +0800 Subject: [PATCH] fix: declare proxy ARGs in frontend Dockerfile for npm ci MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The frontend Dockerfile was missing HTTP_PROXY/HTTPS_PROXY ARG declarations in the build stage, so npm ci could not reach the npm registry through the builder's proxy. Same fix pattern as the API Dockerfile. This explains why the Web image has never been successfully built — the pipeline always skips 'Build Web' after 'Build API' fails, but once API build succeeds, Web build would hit the same npm registry issue. Co-Authored-By: Claude Opus 4.8 (1M context) --- frontend/Dockerfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 275d3e9..6013667 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -4,6 +4,21 @@ ARG NGINX_IMAGE=nginx:1.27-alpine FROM ${NODE_IMAGE} AS build WORKDIR /app +# Proxy settings for npm ci / npm run build (npm registry is only reachable +# via the proxy from the build network). +ARG HTTP_PROXY +ARG HTTPS_PROXY +ARG NO_PROXY +ARG http_proxy +ARG https_proxy +ARG no_proxy +ENV HTTP_PROXY=${HTTP_PROXY} \ + HTTPS_PROXY=${HTTPS_PROXY} \ + NO_PROXY=${NO_PROXY} \ + http_proxy=${http_proxy} \ + https_proxy=${https_proxy} \ + no_proxy=${no_proxy} + COPY package*.json ./ RUN npm ci