switch between arti and default

This commit is contained in:
pratik
2025-10-15 14:28:38 -05:00
parent 4a84c08a2b
commit d7390a3a80
13 changed files with 749 additions and 8 deletions

View File

@@ -1,13 +1,23 @@
# Multi-stage build: First stage builds Angular frontend
FROM node:18-alpine as frontend-builder
# Build argument to select npm registry (public or artifactory)
ARG NPM_REGISTRY=public
ARG ARTIFACTORY_AUTH_TOKEN=""
# Install dependencies for native modules
RUN apk add --no-cache python3 make g++
WORKDIR /frontend
# Copy package files first for better layer caching
# Copy package files and registry configs
COPY frontend/package*.json ./
COPY frontend/.npmrc.${NPM_REGISTRY} ./.npmrc
# If using artifactory and auth token is provided, configure it
RUN if [ "$NPM_REGISTRY" = "artifactory" ] && [ -n "$ARTIFACTORY_AUTH_TOKEN" ]; then \
echo "Configuring Artifactory authentication..."; \
fi
# Clean install dependencies
RUN npm ci --force