fix(docker): remove --prefer-offline from build stage to fix npm ci in CI/CD
Coolify's build environment has no npm cache populated, so --prefer-offline causes npm ci to fail to install devDependencies (incl. typescript). Removing the flag ensures npm always fetches from registry during builds. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
f490152172
commit
6fcb5cbc1d
1 changed files with 3 additions and 3 deletions
|
|
@ -22,9 +22,9 @@ WORKDIR /app
|
|||
# Copy package files
|
||||
COPY package.json package-lock.json ./
|
||||
|
||||
# Install all dependencies (including devDependencies) with cache mount
|
||||
RUN --mount=type=cache,target=/root/.npm \
|
||||
npm ci --prefer-offline
|
||||
# Install all dependencies (including devDependencies)
|
||||
# Note: no --prefer-offline so npm always fetches from registry in CI/CD
|
||||
RUN npm ci
|
||||
|
||||
# Copy TypeScript config
|
||||
COPY tsconfig.json tsconfig.build.json ./
|
||||
|
|
|
|||
Loading…
Reference in a new issue