File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,12 +20,18 @@ WORKDIR ${FOLDER}
2020
2121# Install dependencies based on the preferred package manager
2222RUN \
23- if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
24- elif [ -f package-lock.json ]; then npm ci || npm i; \
25- elif [ -f pnpm-lock.yaml ]; then pnpm i --frozen-lockfile || pnpm i; \
26- else echo "Lockfile not found." && exit 1; \
23+ if [ -f yarn.lock ]; then \
24+ yarn install --frozen-lockfile || yarn install; \
25+ elif [ -f package-lock.json ]; then \
26+ npm ci || npm install; \
27+ elif [ -f pnpm-lock.yaml ]; then \
28+ pnpm install --frozen-lockfile || pnpm install; \
29+ elif [ -f package.json ]; then \
30+ echo "Lockfile not found. Falling back to npm install (non-deterministic install)." ; \
31+ npm install; \
32+ else \
33+ echo "No package manifest found. Skipping install." ; \
2734 fi
28-
2935# Rebuild the source code only when needed
3036FROM base AS builder
3137ARG FOLDER
You can’t perform that action at this time.
0 commit comments