mirror of
https://github.com/netbirdio/docs.git
synced 2026-09-21 06:19:04 +02:00
build: use npm ci for clean, reproducible installs (#839)
Switch pr-build and the Docker image from `npm install` to `npm ci` (`npm ci --omit=dev` in the image), and enable setup-node's npm cache. Deterministic installs from the committed lockfile; CI now fails fast on an out-of-sync lockfile. Depends on the lockfile being tracked (PR #838) — npm ci requires a committed package-lock.json.
This commit is contained in:
+2
-2
@@ -10,8 +10,8 @@ RUN npm install --global pm2
|
||||
# Utilise Docker cache to save re-installing dependencies if unchanged
|
||||
COPY ./package*.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install --production
|
||||
# Install dependencies (npm ci = clean, reproducible install from the lockfile)
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
# Copy all files
|
||||
COPY ./ ./
|
||||
|
||||
Reference in New Issue
Block a user