fix: pre-stage npm ci outside BuildKit sandbox

BuildKit sandbox has no network access for DNS resolution. Instead of
fighting it, run npm ci in a normal Woodpecker step (which has full
network), then COPY the whole frontend dir (including node_modules)
into the Docker build context. The Dockerfile just runs npm run build.
This commit is contained in:
Celes Renata
2026-07-13 05:55:41 +00:00
parent cdad58ae28
commit 2d516a725d
2 changed files with 17 additions and 6 deletions
+16 -2
View File
@@ -189,6 +189,20 @@ steps:
memory: 2Gi
cpu: 4000m
depends_on: []
npm-install-dashboard:
image: registry.celestium.life/dockerhub-cache/library/node:24-alpine
commands:
- cd frontend && npm ci
backend_options:
kubernetes:
resources:
requests:
memory: 1Gi
cpu: 1000m
limits:
memory: 2Gi
cpu: 4000m
depends_on: []
build-dashboard:
image: woodpeckerci/plugin-docker-buildx
privileged: true
@@ -198,7 +212,6 @@ steps:
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
network: host
insecure: true
buildkit_config: |
[registry."registry.celestium.life"]
@@ -231,7 +244,8 @@ steps:
limits:
memory: 2Gi
cpu: 4000m
depends_on: []
depends_on:
- npm-install-dashboard
build-superset:
image: woodpeckerci/plugin-docker-buildx
privileged: true