yazid138 2 سال پیش
والد
کامیت
5b803041be
1فایلهای تغییر یافته به همراه4 افزوده شده و 5 حذف شده
  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