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.
16 lines
567 B
Docker
16 lines
567 B
Docker
# Stage 1: Build (node_modules pre-installed by CI step outside sandbox)
|
|
FROM registry.celestium.life/dockerhub-cache/library/node:24-alpine AS build
|
|
WORKDIR /app
|
|
COPY . .
|
|
ARG VITE_QUERY_API_URL=""
|
|
ARG VITE_SYMBOL_REGISTRY_URL=""
|
|
ARG VITE_RISK_ENGINE_URL=""
|
|
RUN npm run build
|
|
|
|
# Stage 2: Serve (unprivileged nginx, runs as uid 101, port 8080)
|
|
FROM registry.celestium.life/dockerhub-cache/nginxinc/nginx-unprivileged:alpine
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
EXPOSE 8080
|
|
CMD ["nginx", "-g", "daemon off;"]
|