File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,19 @@ FROM node:20-alpine AS build
33WORKDIR /app
44
55# Install dependencies with cache mount for npm cache
6- COPY package.json package-lock.json ./
6+ # Some branches intentionally do not track package-lock.json.
7+ # Copy whichever npm manifest files exist and install accordingly.
8+ COPY package*.json ./
79RUN npm config set fetch-retries 10 \
810 && npm config set fetch-retry-mintimeout 30000 \
911 && npm config set fetch-retry-maxtimeout 300000
1012
1113RUN --mount=type=cache,target=/root/.npm \
12- npm ci --legacy-peer-deps --no-audit --no-fund --registry=https://registry.npmjs.org/
14+ if [ -f package-lock.json ]; then \
15+ npm ci --legacy-peer-deps --no-audit --no-fund --registry=https://registry.npmjs.org/; \
16+ else \
17+ npm install --legacy-peer-deps --no-audit --no-fund --registry=https://registry.npmjs.org/; \
18+ fi
1319
1420
1521# Copy source code
You can’t perform that action at this time.
0 commit comments