Update Dockerfile
Browse files- 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
|