abubasith86 commited on
Commit
3213340
·
1 Parent(s): 07e9f93
Files changed (1) hide show
  1. Dockerfile +3 -1
Dockerfile CHANGED
@@ -29,6 +29,9 @@ WORKDIR /usr/src/app
29
  # Install npm dependencies
30
  RUN npm install
31
 
 
 
 
32
  # Copy package.json and the generated package-lock.json from the builder stage
33
  COPY package.json ./
34
  COPY --from=builder /app/package-lock.json ./
@@ -37,7 +40,6 @@ RUN npm ci --only=production
37
 
38
  # Copy the rest of your application code
39
  COPY . .
40
-
41
  # Expose the port your application runs on
42
  EXPOSE 5000
43
 
 
29
  # Install npm dependencies
30
  RUN npm install
31
 
32
+ # Second stage: use the generated package-lock.json for a clean install
33
+ FROM node:23.7.0
34
+ WORKDIR /usr/src/app
35
  # Copy package.json and the generated package-lock.json from the builder stage
36
  COPY package.json ./
37
  COPY --from=builder /app/package-lock.json ./
 
40
 
41
  # Copy the rest of your application code
42
  COPY . .
 
43
  # Expose the port your application runs on
44
  EXPOSE 5000
45