fix: Handle missing package-lock.json in Docker build
Changed Dockerfile to conditionally use npm ci or npm install depending on whether package-lock.json exists. This makes the build more flexible while still preferring npm ci for reproducibility when a lock file is available. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,8 @@ WORKDIR /app
|
|||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
|
|
||||||
# Install dependencies (including devDependencies for build)
|
# Install dependencies (including devDependencies for build)
|
||||||
RUN npm ci
|
# Use npm ci if package-lock.json exists, otherwise use npm install
|
||||||
|
RUN if [ -f package-lock.json ]; then npm ci; else npm install; fi
|
||||||
|
|
||||||
# ======================
|
# ======================
|
||||||
# Stage 2: Builder
|
# Stage 2: Builder
|
||||||
|
|||||||
Reference in New Issue
Block a user