WebHub360 commited on
Commit
3cf2041
·
verified ·
1 Parent(s): 8f83968

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -8
Dockerfile CHANGED
@@ -11,15 +11,18 @@ ENV TZ=Europe/Paris \
11
  # Install Python dependencies directly (avoid using apt for Python)
12
  RUN pip install --no-cache-dir python-dotenv requests
13
 
14
- # mongo installation
15
- RUN curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | \
16
- gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \
17
- --dearmor
18
-
19
- RUN echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-7.0.list
20
 
21
- RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
22
- mongodb-org && \
 
 
 
 
23
  rm -rf /var/lib/apt/lists/*
24
 
25
  # node installation
 
11
  # Install Python dependencies directly (avoid using apt for Python)
12
  RUN pip install --no-cache-dir python-dotenv requests
13
 
14
+ # Troubleshoot MongoDB installation issues
15
+ RUN apt-get update && apt-get install -y --no-install-recommends \
16
+ wget gnupg apt-utils && \
17
+ apt-get clean && \
18
+ rm -rf /var/lib/apt/lists/*
 
19
 
20
+ # MongoDB installation with explicit version
21
+ RUN wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | apt-key add - && \
22
+ echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-6.0.list && \
23
+ apt-get update && \
24
+ apt-get install -y --no-install-recommends mongodb-org-server=6.0.11 mongodb-org-mongos=6.0.11 mongodb-org-shell=6.0.11 && \
25
+ apt-get clean && \
26
  rm -rf /var/lib/apt/lists/*
27
 
28
  # node installation