revert npm logic
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -9,10 +9,17 @@ WORKDIR /frontend
|
||||
# Copy package files
|
||||
COPY frontend/package*.json ./
|
||||
|
||||
# Copy .npmrc from frontend directory if it exists (using glob pattern to avoid errors)
|
||||
# This allows different environments to use different npm registries
|
||||
# To use: copy your user-level .npmrc to frontend/.npmrc before building
|
||||
# Unix/Mac: cp ~/.npmrc frontend/.npmrc
|
||||
# Windows: copy %USERPROFILE%\.npmrc frontend\.npmrc
|
||||
COPY frontend/.npmr[c] ./ 2>/dev/null || :
|
||||
|
||||
# Install dependencies using npm install
|
||||
# This will use the Docker build environment's npm configuration (.npmrc)
|
||||
# and generate a package-lock.json appropriate for the configured registry
|
||||
RUN npm install --legacy-peer-deps
|
||||
# This will use the .npmrc configuration if present and generate a package-lock.json
|
||||
# appropriate for the configured registry (Artifactory or public npm)
|
||||
RUN npm install
|
||||
|
||||
# Copy frontend source
|
||||
COPY frontend/src ./src
|
||||
|
||||
Reference in New Issue
Block a user