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:
Celes Renata
2026-07-13 04:47:37 +00:00
parent 46d7699ed0
commit d762a2b76f
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -197,7 +197,7 @@ steps:
registry: registry.celestium.life registry: registry.celestium.life
buildx_image: registry.celestium.life/dockerhub-cache/moby/buildkit:buildx-stable-1 buildx_image: registry.celestium.life/dockerhub-cache/moby/buildkit:buildx-stable-1
add_host: registry.celestium.life:10.1.1.12 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 insecure: true
buildkit_config: | buildkit_config: |
[registry."registry.celestium.life"] [registry."registry.celestium.life"]
+2 -1
View File
@@ -1,9 +1,10 @@
# syntax=docker/dockerfile:1
# Stage 1: Build # Stage 1: Build
# Base images: uses Harbor proxy cache in CI, falls back to Docker Hub externally # 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 FROM registry.celestium.life/dockerhub-cache/library/node:24-alpine AS build
WORKDIR /app WORKDIR /app
COPY package.json package-lock.json ./ 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 . . COPY . .
ARG VITE_QUERY_API_URL="" ARG VITE_QUERY_API_URL=""
ARG VITE_SYMBOL_REGISTRY_URL="" ARG VITE_SYMBOL_REGISTRY_URL=""