fix: use RUN --network=host for npm ci in BuildKit
BuildKit sandbox DNS cannot resolve registry.npmjs.org. Using --network=host on the RUN step lets npm use the host network stack directly, bypassing the broken sandbox DNS.
This commit is contained in:
@@ -197,7 +197,7 @@ steps:
|
||||
registry: registry.celestium.life
|
||||
buildx_image: registry.celestium.life/dockerhub-cache/moby/buildkit:buildx-stable-1
|
||||
add_host: registry.celestium.life:10.1.1.12
|
||||
buildx_flags: --driver-opt network=host
|
||||
buildx_flags: --driver-opt network=host --allow network.host
|
||||
insecure: true
|
||||
buildkit_config: |
|
||||
[registry."registry.celestium.life"]
|
||||
|
||||
+2
-1
@@ -1,9 +1,10 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
# Stage 1: Build
|
||||
# Base images: uses Harbor proxy cache in CI, falls back to Docker Hub externally
|
||||
FROM registry.celestium.life/dockerhub-cache/library/node:24-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN echo "nameserver 8.8.8.8" > /etc/resolv.conf && echo "nameserver 1.1.1.1" >> /etc/resolv.conf && npm ci
|
||||
RUN --network=host npm ci
|
||||
COPY . .
|
||||
ARG VITE_QUERY_API_URL=""
|
||||
ARG VITE_SYMBOL_REGISTRY_URL=""
|
||||
|
||||
Reference in New Issue
Block a user