yazid138 2 gadi atpakaļ
vecāks
revīzija
5b803041be
1 mainītis faili ar 4 papildinājumiem un 5 dzēšanām
  1. 4 5
      dockerfile

+ 4 - 5
dockerfile

@@ -4,6 +4,10 @@ FROM node:14
 RUN mkdir -p /usr/src/app
 WORKDIR /usr/src/app
 
+# Install MongoDB tools
+RUN apt update &&  \
+    apt install -y mongodb-clients
+
 # Installing node dependencies
 COPY package.json ./
 RUN npm install
@@ -11,11 +15,6 @@ RUN npm install
 # Copying source files
 COPY . .
 
-# Install MongoDB tools (mongodump) - this example assumes you're using Debian/Ubuntu-based image
-RUN apt-get update && \
-    apt-get install -y mongodb-clients && \
-    apt-get clean
-
 # Building app
 EXPOSE 5000