Browse Source

Use `npm ci` for installing pacakages (#304)

Jaime Baez 3 years ago
parent
commit
355038a91a
3 changed files with 7 additions and 7 deletions
  1. 2 2
      machine-learning/Dockerfile
  2. 1 1
      server/Dockerfile
  3. 4 4
      web/Dockerfile

+ 2 - 2
machine-learning/Dockerfile

@@ -1,4 +1,4 @@
-FROM node:16-bullseye-slim 
+FROM node:16-bullseye-slim
 
 ARG DEBIAN_FRONTEND=noninteractive
 
@@ -9,7 +9,7 @@ COPY package.json package-lock.json ./
 RUN apt-get update
 RUN apt-get install gcc g++ make cmake python3 python3-pip ffmpeg -y
 
-RUN npm install
+RUN npm ci
 
 COPY . .
 

+ 1 - 1
server/Dockerfile

@@ -8,7 +8,7 @@ COPY package.json package-lock.json ./
 
 RUN apk add --update-cache build-base python3 libheif vips-dev vips ffmpeg
 
-RUN npm install --legacy-peer-deps
+RUN npm ci
 
 COPY . .
 

+ 4 - 4
web/Dockerfile

@@ -7,9 +7,9 @@ RUN chown node:node /usr/src/app
 
 COPY --chown=node:node package*.json ./
 
-RUN apk add --update-cache build-base python3 
+RUN apk add --update-cache build-base python3
 
-RUN npm install
+RUN npm ci
 
 COPY --chown=node:node . .
 
@@ -29,9 +29,9 @@ RUN chown node:node /usr/src/app
 COPY --chown=node:node package*.json ./
 COPY --chown=node:node . .
 
-RUN apk add --update-cache build-base python3 
+RUN apk add --update-cache build-base python3
 
-RUN npm install
+RUN npm ci
 
 EXPOSE 3000