DeMaking commited on
Commit
20025a9
·
verified ·
1 Parent(s): 6c724eb

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -1
Dockerfile CHANGED
@@ -18,7 +18,7 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
18
  RUN apt-get update && apt-get install -y dnsutils
19
 
20
  # Force using Google's DNS
21
- RUN sed -i '1inameserver 8.8.8.8\nnameserver 8.8.4.4' /etc/resolv.conf || echo "Failed to update DNS"
22
 
23
 
24
  # Copy the app files
@@ -29,6 +29,12 @@ EXPOSE 7860
29
  # 8443
30
  # 5000
31
 
 
 
 
 
 
 
32
  # Run both FAST API and Telegram BOT
33
  CMD ["bash", "start.sh"]
34
  # CMD python3 app.py
 
18
  RUN apt-get update && apt-get install -y dnsutils
19
 
20
  # Force using Google's DNS
21
+ #RUN sed -i '1inameserver 8.8.8.8\nnameserver 8.8.4.4' /etc/resolv.conf || echo "Failed to update DNS"
22
 
23
 
24
  # Copy the app files
 
29
  # 8443
30
  # 5000
31
 
32
+ # Use Google's DNS inside the container
33
+ RUN echo "options timeout:1 attempts:1" >> /etc/resolv.conf && \
34
+ echo "nameserver 8.8.8.8" >> /etc/resolv.conf && \
35
+ echo "nameserver 8.8.4.4" >> /etc/resolv.conf
36
+
37
+
38
  # Run both FAST API and Telegram BOT
39
  CMD ["bash", "start.sh"]
40
  # CMD python3 app.py