Add NPM_REGISTRY build arg support in Dockerfile

- Accept NPM_REGISTRY ARG in frontend build stage
- Configure npm registry before install if provided
- Add build-arg to MR build stage in CI
This commit is contained in:
Mondo Diaz
2025-12-05 17:58:12 -06:00
parent 2105fca189
commit 386ea0df4d
2 changed files with 8 additions and 1 deletions

View File

@@ -1,8 +1,13 @@
# Frontend build stage
FROM node:20-alpine AS frontend-builder
ARG NPM_REGISTRY
WORKDIR /app/frontend
# Configure npm registry if provided
RUN if [ -n "$NPM_REGISTRY" ]; then npm config set registry "$NPM_REGISTRY"; fi
# Copy package files
COPY frontend/package*.json ./
RUN npm install